(context: StreamingContext, leg: StreamingContext)
| 304 | // shared context. Child (subagent-lane) legs leave the join scalars empty; only |
| 305 | // the join-carrying leg (which streams the orchestrator continuation) sets them. |
| 306 | export function mergeResumeLegOutputs(context: StreamingContext, leg: StreamingContext): void { |
| 307 | if (leg.accumulatedContent) context.accumulatedContent += leg.accumulatedContent |
| 308 | if (leg.finalAssistantContent) context.finalAssistantContent += leg.finalAssistantContent |
| 309 | if (leg.usage) context.usage = leg.usage |
| 310 | if (leg.cost) context.cost = leg.cost |
| 311 | if (leg.sawMainToolCall) context.sawMainToolCall = true |
| 312 | if (leg.wasAborted) context.wasAborted = true |
| 313 | if (leg.errors.length > 0) context.errors.push(...leg.errors) |
| 314 | } |
| 315 | |
| 316 | async function waitForToolIds(context: StreamingContext, toolIds: string[]): Promise<void> { |
| 317 | const promises: Promise<unknown>[] = [] |
no test coverage detected