fix(tui): label only detached subagents as background (#37306)
This commit is contained in:
parent
2ad6c42143
commit
041cda905d
2 changed files with 19 additions and 6 deletions
|
|
@ -4,6 +4,7 @@ import { testRender, type JSX } from "@opentui/solid"
|
|||
import {
|
||||
formatSubagentRetry,
|
||||
InlineToolRow,
|
||||
isBackgroundSubagent,
|
||||
parseApplyPatchFiles,
|
||||
parseDiagnostics,
|
||||
parseQuestionAnswers,
|
||||
|
|
@ -201,6 +202,13 @@ describe("TUI inline tool wrapping", () => {
|
|||
expect(formatSubagentRetry(2, "Rate limited by provider")).toBe("Retrying (attempt 2) · Rate limited by provider")
|
||||
})
|
||||
|
||||
test("labels only detached or async subagents as background", () => {
|
||||
expect(isBackgroundSubagent({ status: "running" }, "running")).toBeFalse()
|
||||
expect(isBackgroundSubagent({ status: "running" }, "completed")).toBeTrue()
|
||||
expect(isBackgroundSubagent({ status: "running" }, "error")).toBeFalse()
|
||||
expect(isBackgroundSubagent({ status: "completed" }, "completed")).toBeFalse()
|
||||
})
|
||||
|
||||
test("snapshots consecutive grep, glob, and read rows at a narrow width", async () => {
|
||||
expect(await renderFrame(() => <Fixture />, { width: 72, height: 12 })).toMatchSnapshot()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue