feat(tui): show background label on subagent line

This commit is contained in:
Dax Raad 2026-07-01 20:14:43 -04:00
commit d544ab4d91
2 changed files with 2 additions and 2 deletions

View file

@ -2262,7 +2262,7 @@ export function formatSubagentToolcalls(count: number) {
}
export function formatSubagentTitle(agent: string, description: string, background: boolean) {
return `${agent} Subagent${background ? " (background)" : ""}${description}`
return `${agent} Subagent${description}${background ? " [background]" : ""}`
}
export function formatSubagentRetry(attempt: number, message: string) {

View file

@ -175,7 +175,7 @@ describe("TUI inline tool wrapping", () => {
test("keeps background state attached to the subagent identity", () => {
expect(formatSubagentTitle("Explore", "Inspect renderer", false)).toBe("Explore Subagent — Inspect renderer")
expect(formatSubagentTitle("Explore", "Inspect renderer", true)).toBe(
"Explore Subagent (background) — Inspect renderer",
"Explore Subagent — Inspect renderer [background]",
)
})