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 <noreply@anthropic.com>
This commit is contained in:
parent
5a3dc6c1e1
commit
4e5c99a97f
1 changed files with 7 additions and 0 deletions
|
|
@ -81,6 +81,12 @@ function getSubtitle(toolName: string, args?: Record<string, unknown>): 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<string, string> = {
|
|||
web_search: "searching…",
|
||||
web_fetch: "fetching…",
|
||||
data: "fetching…",
|
||||
sessions_spawn: "spawning…",
|
||||
}
|
||||
|
||||
/** Stats derived from tool result content */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue