feat: align TaskOutput UX with Bash output (#1029)

This commit is contained in:
Charles Packer
2026-02-18 22:53:41 -08:00
committed by GitHub
parent 674e8c12c2
commit 47e81433ff
9 changed files with 266 additions and 44 deletions

View File

@@ -1,5 +1,9 @@
import { describe, expect, test } from "bun:test";
import { isMemoryTool } from "../../cli/helpers/toolNameMapping";
import {
getDisplayToolName,
isMemoryTool,
isShellOutputTool,
} from "../../cli/helpers/toolNameMapping";
describe("toolNameMapping.isMemoryTool", () => {
test("recognizes all supported memory tool names", () => {
@@ -15,3 +19,16 @@ describe("toolNameMapping.isMemoryTool", () => {
expect(isMemoryTool("web_search")).toBe(false);
});
});
describe("toolNameMapping task output mappings", () => {
test("uses distinct display labels for shell output and task output", () => {
expect(getDisplayToolName("BashOutput")).toBe("Shell Output");
expect(getDisplayToolName("TaskOutput")).toBe("Task Output");
});
test("treats TaskOutput as shell-style output for streaming UI", () => {
expect(isShellOutputTool("TaskOutput")).toBe(true);
expect(isShellOutputTool("BashOutput")).toBe(true);
expect(isShellOutputTool("Task")).toBe(false);
});
});