feat(tui): show background label on subagent line
This commit is contained in:
@@ -2262,7 +2262,7 @@ export function formatSubagentToolcalls(count: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function formatSubagentTitle(agent: string, description: string, background: boolean) {
|
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) {
|
export function formatSubagentRetry(attempt: number, message: string) {
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ describe("TUI inline tool wrapping", () => {
|
|||||||
test("keeps background state attached to the subagent identity", () => {
|
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", false)).toBe("Explore Subagent — Inspect renderer")
|
||||||
expect(formatSubagentTitle("Explore", "Inspect renderer", true)).toBe(
|
expect(formatSubagentTitle("Explore", "Inspect renderer", true)).toBe(
|
||||||
"Explore Subagent (background) — Inspect renderer",
|
"Explore Subagent — Inspect renderer [background]",
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user