Skip to content

Commit 94fe1ae

Browse files
committed
address comments
1 parent 4180a7c commit 94fe1ae

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ function parseBlocks(blocks: ContentBlock[]): MessageSegment[] {
199199
for (const [key, g] of groupsByKey) {
200200
if (key.endsWith(`:${parentToolCallId}`)) return g
201201
}
202+
return undefined
202203
}
203204
if (activeGroupKey) return groupsByKey.get(activeGroupKey)
204205
return undefined

apps/sim/lib/copilot/request/go/stream.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,15 @@ export async function runStreamLoop(
380380
timestamp: Date.now(),
381381
})
382382
}
383+
} else {
384+
// Protocol invariant: every subagent_start carries scope.parentToolCallId
385+
// (or data.tool_call_id) and a subagent name. If we see otherwise the
386+
// group cannot be keyed and the lane will not render — log so a
387+
// server-side regression is visible.
388+
logger.warn('subagent start missing toolCallId or agent name', {
389+
hasToolCallId: Boolean(toolCallId),
390+
hasSubagentName: Boolean(subagentName),
391+
})
383392
}
384393
return
385394
}

0 commit comments

Comments
 (0)