Skip to content

Commit 8dcbb29

Browse files
committed
address mothership legacy key
1 parent e313b8c commit 8dcbb29

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@ function parseBlocks(blocks: ContentBlock[]): MessageSegment[] {
295295
}
296296
}
297297
}
298+
// Subagent lanes break the mothership lane: any mothership tool that
299+
// arrives after this subagent finishes should render below the lane,
300+
// not get back-filled into the mothership group sitting above it.
301+
groupsByKey.delete(groupKey('mothership', undefined))
298302
const g = ensureGroup(key, block.parentToolCallId)
299303
if (inheritedDelegation) g.isDelegating = true
300304
g.isOpen = block.endedAt === undefined
@@ -310,6 +314,7 @@ function parseBlocks(blocks: ContentBlock[]): MessageSegment[] {
310314
const isDispatch = SUBAGENT_KEYS.has(tc.name) && !tc.calledBy
311315

312316
if (isDispatch) {
317+
groupsByKey.delete(groupKey('mothership', undefined))
313318
const g = ensureGroup(tc.name, tc.id)
314319
g.isDelegating = isDelegatingTool(tc)
315320
g.isOpen = g.isDelegating

0 commit comments

Comments
 (0)