From 4e5c99a97f762e01b8d9232f6045a4b44f29d469 Mon Sep 17 00:00:00 2001 From: Jiayuan Zhang Date: Wed, 11 Feb 2026 16:59:16 +0800 Subject: [PATCH] feat(ui): show task context for sessions_spawn in chat UI Display the label (or truncated task) as subtitle for SpawnSession tool calls, so users can see what each spawned session is working on. Co-Authored-By: Claude Opus 4.6 --- packages/ui/src/components/tool-call-item.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/ui/src/components/tool-call-item.tsx b/packages/ui/src/components/tool-call-item.tsx index db93c03e..32888fae 100644 --- a/packages/ui/src/components/tool-call-item.tsx +++ b/packages/ui/src/components/tool-call-item.tsx @@ -81,6 +81,12 @@ function getSubtitle(toolName: string, args?: Record): string { const ticker = params?.ticker ? String(params.ticker).toUpperCase() : "" return ticker ? `${action} ${ticker}` : action } + case "sessions_spawn": { + const label = args.label ? String(args.label) : "" + if (label) return label.length > 60 ? label.slice(0, 57) + "…" : label + const task = String(args.task ?? "") + return task.length > 60 ? task.slice(0, 57) + "…" : task + } default: return "" } @@ -100,6 +106,7 @@ const RUNNING_LABELS: Record = { web_search: "searching…", web_fetch: "fetching…", data: "fetching…", + sessions_spawn: "spawning…", } /** Stats derived from tool result content */