feat: align TaskOutput UX with Bash output (#1029)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user