File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,31 @@ export class CodebuffRunner implements Runner {
9090 } ,
9191 } )
9292
93+ if ( result . output . type === 'error' ) {
94+ console . error (
95+ `[${ this . commitId } :${ this . agentId } ] Error:` ,
96+ result . output . message ,
97+ )
98+ if ( DEBUG_ERROR ) {
99+ // Save errors in a file, but not tool calls with invalid json.
100+ fs . writeFileSync (
101+ path . join (
102+ __dirname ,
103+ '..' ,
104+ `${ this . commitId } -${ this . agentId } -error-${ Math . random ( ) . toString ( 36 ) . substring ( 2 , 6 ) } .json` ,
105+ ) ,
106+ JSON . stringify (
107+ {
108+ ...result . output ,
109+ trace : steps ,
110+ } ,
111+ null ,
112+ 2 ,
113+ ) ,
114+ )
115+ }
116+ }
117+
93118 totalCostUsd = ( result . sessionState ?. mainAgentState . creditsUsed ?? 0 ) / 100
94119
95120 // Get git diff after Codebuff has made changes
You can’t perform that action at this time.
0 commit comments