550
continue;
551
}
553
>
if (!builder) {
554
// No active turn to attach this completion to.
555
continue;
556
}
557
>
const completedPart = makeCompletedToolCallPart(d, info, sessionUriStr, providerId, rawSessionId, storedEdits, subagentInfoByToolCallId.get(d.toolCallId));
mapSessionEvents.ts
558
>
builder.responseParts.push(completedPart);
559
>
// When a parent tool call that spawned a subagent completes,
560
>
// flush the subagent's accumulated turn.
561
if (!parentToolCallId && subagentInfoByToolCallId.has(d.toolCallId)) {
562
flushSubagent(d.toolCallId);
563
}
565
>
}
566
case 'skill.invoked': {
567
const synth = synthesizeSkillToolCall(e.data, e.id);