summaryrefslogtreecommitdiffhomepage
path: root/src/features/chat/ui.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-22 14:40:57 +0900
committerAdam Malczewski <[email protected]>2026-06-22 14:40:57 +0900
commitce1321eccf24e0923642ae2ef74f6220ecd7f75a (patch)
tree2132982674bee46ecb962baeb5cb40a472e48aef /src/features/chat/ui.test.ts
parent968149af352fa4e0f0277ea87fae837f7c46c4fa (diff)
downloaddispatch-web-ce1321eccf24e0923642ae2ef74f6220ecd7f75a.tar.gz
dispatch-web-ce1321eccf24e0923642ae2ef74f6220ecd7f75a.zip
feat: collapsible tool output (collapsed by default like thinking)
Tool calls and results now use the same DaisyUI collapse pattern as thinking blocks — collapsed by default, click to expand. Each card shows the tool name + a wrench icon in the title; expanding reveals the input/output with overflow-x-auto for long lines and max-h-96 overflow-y-auto for very long output. Batched tool calls: each entry is its own collapse card (was a DaisyUI list). Pending results show a spinner in the title. Errors show a red badge. 686 tests green.
Diffstat (limited to 'src/features/chat/ui.test.ts')
-rw-r--r--src/features/chat/ui.test.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/features/chat/ui.test.ts b/src/features/chat/ui.test.ts
index 2891e5b..b8b3193 100644
--- a/src/features/chat/ui.test.ts
+++ b/src/features/chat/ui.test.ts
@@ -242,10 +242,9 @@ describe("ChatView", () => {
const { container } = render(ChatView, { props: { chunks } });
- // One DaisyUI list with two rows (one per call), not separate cards.
- const lists = container.querySelectorAll("ul.list");
- expect(lists).toHaveLength(1);
- expect(container.querySelectorAll("ul.list > li.list-row")).toHaveLength(2);
+ // Batched calls render as collapsible cards (one per call), not a list.
+ const collapses = container.querySelectorAll(".collapse");
+ expect(collapses).toHaveLength(2);
// Both call names + the available result are shown; the result is absorbed
// (no standalone tool-result card).