MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / handleSpawnAgentsResult

Function handleSpawnAgentsResult

cli/src/utils/sdk-event-handlers.ts:436–450  ·  view source on GitHub ↗
(
  state: EventHandlerState,
  toolCallId: string,
  results: any[],
)

Source from the content-addressed store, hash-verified

434}
435
436const handleSpawnAgentsResult = (
437 state: EventHandlerState,
438 toolCallId: string,
439 results: any[],
440) => {
441 // Replace placeholder spawn agent blocks with their final text/status output.
442 state.message.updater.updateAiMessageBlocks((blocks) =>
443 updateSpawnAgentBlocks(blocks, toolCallId, results),
444 )
445
446 results.forEach((_, index: number) => {
447 const agentId = `${toolCallId}-${index}`
448 updateStreamingAgents(state, { remove: agentId })
449 })
450}
451
452const handleToolResult = (
453 state: EventHandlerState,

Callers 1

handleToolResultFunction · 0.85

Calls 2

updateSpawnAgentBlocksFunction · 0.85
updateStreamingAgentsFunction · 0.85

Tested by

no test coverage detected