@@ -82,17 +82,17 @@ export type CodebuffClientOptions = {
8282 chunk :
8383 | string
8484 | {
85- type : 'subagent_chunk'
86- agentId : string
87- agentType : string
88- chunk : string
89- }
85+ type : 'subagent_chunk'
86+ agentId : string
87+ agentType : string
88+ chunk : string
89+ }
9090 | {
91- type : 'reasoning_chunk'
92- agentId : string
93- ancestorRunIds : string [ ]
94- chunk : string
95- } ,
91+ type : 'reasoning_chunk'
92+ agentId : string
93+ ancestorRunIds : string [ ]
94+ chunk : string
95+ } ,
9696 ) => void | Promise < void >
9797
9898 /** Optional filter to classify files before reading (runs before gitignore check) */
@@ -139,8 +139,7 @@ export type RunOptions = {
139139 previousRun ?: RunState
140140 extraToolResults ?: ToolMessage [ ]
141141 signal ?: AbortSignal
142- /** Cost mode - 'free' mode makes all agents cost 0 credits */
143- costMode ?: 'free' | 'normal' | 'max' | 'experimental' | 'ask'
142+ costMode ?: string
144143}
145144
146145const createAbortError = ( signal ?: AbortSignal ) => {
@@ -255,8 +254,8 @@ async function runOnce({
255254 } )
256255 }
257256
258- let resolve : ( value : RunReturnType ) => any = ( ) => { }
259- let reject : ( error : any ) => any = ( ) => { }
257+ let resolve : ( value : RunReturnType ) => any = ( ) => { }
258+ let reject : ( error : any ) => any = ( ) => { }
260259 const promise = new Promise < RunReturnType > ( ( res , rej ) => {
261260 resolve = res
262261 reject = rej
@@ -369,8 +368,8 @@ async function runOnce({
369368 overrides : overrideTools ?? { } ,
370369 customToolDefinitions : customToolDefinitions
371370 ? Object . fromEntries (
372- customToolDefinitions . map ( ( def ) => [ def . toolName , def ] ) ,
373- )
371+ customToolDefinitions . map ( ( def ) => [ def . toolName , def ] ) ,
372+ )
374373 : { } ,
375374 cwd,
376375 fs,
@@ -674,9 +673,9 @@ async function handleToolCall({
674673 value : {
675674 errorMessage :
676675 error &&
677- typeof error === 'object' &&
678- 'message' in error &&
679- typeof error . message === 'string'
676+ typeof error === 'object' &&
677+ 'message' in error &&
678+ typeof error . message === 'string'
680679 ? error . message
681680 : typeof error === 'string'
682681 ? error
0 commit comments