File tree Expand file tree Collapse file tree 1 file changed +14
-21
lines changed
Expand file tree Collapse file tree 1 file changed +14
-21
lines changed Original file line number Diff line number Diff line change @@ -334,29 +334,21 @@ export async function runProgrammaticStep(
334334 }
335335 break
336336 case 'tool_call' :
337+ case 'tool_result' : {
337338 if ( ! chunk . parentAgentId ) {
339+ const debugPayload =
340+ chunk . type === 'tool_call'
341+ ? {
342+ eventType : chunk . type ,
343+ agentId : chunk . agentId ,
344+ parentId : parentAgentId ,
345+ }
346+ : {
347+ eventType : chunk . type ,
348+ parentId : parentAgentId ,
349+ }
338350 logger . debug (
339- {
340- eventType : chunk . type ,
341- agentId : chunk . agentId ,
342- parentId : parentAgentId ,
343- } ,
344- `run-programmatic-step: Adding parentAgentId to ${ chunk . type } event` ,
345- )
346- onResponseChunk ( {
347- ...chunk ,
348- parentAgentId,
349- } )
350- return
351- }
352- break
353- case 'tool_result' :
354- if ( ! chunk . parentAgentId ) {
355- logger . debug (
356- {
357- eventType : chunk . type ,
358- parentId : parentAgentId ,
359- } ,
351+ debugPayload ,
360352 `run-programmatic-step: Adding parentAgentId to ${ chunk . type } event` ,
361353 )
362354 onResponseChunk ( {
@@ -366,6 +358,7 @@ export async function runProgrammaticStep(
366358 return
367359 }
368360 break
361+ }
369362 default :
370363 break
371364 }
You can’t perform that action at this time.
0 commit comments