diff options
| author | Adam Malczewski <[email protected]> | 2026-10-15 09:31:00 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-10-15 09:31:00 +0900 |
| commit | 0a76db397e92c945fefabcf08ff89dcc97f6e6c3 (patch) | |
| tree | 13fa75ee23f187d1a48beb83b9c7f73d9a7a9f41 /src/features/chat/ui/ChatView.test.ts | |
| parent | 633b94326ec4b33fe19d65d02ef78d8a6b14e4e9 (diff) | |
| download | dispatch-web-0a76db397e92c945fefabcf08ff89dcc97f6e6c3.tar.gz dispatch-web-0a76db397e92c945fefabcf08ff89dcc97f6e6c3.zip | |
feat(tool-call-cards): distinct Phosphor icon per tool (phosphor-svelte, deep imports)
Diffstat (limited to 'src/features/chat/ui/ChatView.test.ts')
| -rw-r--r-- | src/features/chat/ui/ChatView.test.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/features/chat/ui/ChatView.test.ts b/src/features/chat/ui/ChatView.test.ts index 4b28b48..77f832d 100644 --- a/src/features/chat/ui/ChatView.test.ts +++ b/src/features/chat/ui/ChatView.test.ts @@ -470,3 +470,30 @@ it("shows an argument-less call without `{}` — empty header summary, 'No argum expect(screen.getByText("No arguments")).toBeInTheDocument(); expect(container).not.toHaveTextContent("{}"); }); + +it("renders a per-tool Phosphor icon in the header", () => { + const chunks: RenderedChunk[] = [ + { + seq: 1, + role: "assistant", + provisional: false, + chunk: { + type: "tool-call", + toolCallId: "s", + toolName: "run_shell", + input: { command: "ls" }, + }, + }, + { + seq: 2, + role: "assistant", + provisional: false, + chunk: { type: "tool-call", toolCallId: "r", toolName: "read_file", input: { path: "a.ts" } }, + }, + ]; + const { container } = render(ChatView, { props: { chunks } }); + const icons = Array.from(container.querySelectorAll(".tool-header svg[aria-hidden='true']")); + expect(icons).toHaveLength(2); + // Different tools → different glyphs. + expect(icons[0]?.innerHTML).not.toBe(icons[1]?.innerHTML); +}); |
