File tree 1 file changed +8
-3
lines changed
apps/ui-tars/src/main/services
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export const runAgent = async (
63
63
} ) => {
64
64
const lastConv = getState ( ) . messages [ getState ( ) . messages . length - 1 ] ;
65
65
const { status, conversations, ...restUserData } = data ;
66
- logger . info ( '[status] ' , status , conversations . length ) ;
66
+ logger . info ( '[onGUIAgentData] status ' , status , conversations . length ) ;
67
67
68
68
// add SoM to conversations
69
69
const conversationsWithSoM : ConversationWithSoM [ ] = await Promise . all (
@@ -102,7 +102,7 @@ export const runAgent = async (
102
102
...rest
103
103
} = conversationsWithSoM ?. [ conversationsWithSoM . length - 1 ] || { } ;
104
104
logger . info (
105
- '======data======\n' ,
105
+ '[onGUIAgentData] ======data======\n' ,
106
106
predictionParsed ,
107
107
screenshotContext ,
108
108
rest ,
@@ -166,7 +166,12 @@ export const runAgent = async (
166
166
operator : operator ,
167
167
onData : handleData ,
168
168
onError : ( { error } ) => {
169
- logger . error ( '[runAgent error]' , settings , error ) ;
169
+ logger . error ( '[onGUIAgentError]' , settings , error ) ;
170
+ setState ( {
171
+ ...getState ( ) ,
172
+ status : StatusEnum . ERROR ,
173
+ errorMsg : JSON . stringify ( error ) ,
174
+ } ) ;
170
175
} ,
171
176
retry : {
172
177
model : {
You can’t perform that action at this time.
0 commit comments