diff options
| author | Adam Malczewski <[email protected]> | 2026-06-22 14:40:57 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-22 14:40:57 +0900 |
| commit | 0ab13155b0d32a6062797b3f3da1c093b30cc9f0 (patch) | |
| tree | 64739736f70acc152336484ee7deb4e9145e0eb6 /src/features/chat/ui.test.ts | |
| parent | cbf2b73ca7ae80b5182b141c2ae533f2b6f10f8b (diff) | |
| download | dispatch-web-0ab13155b0d32a6062797b3f3da1c093b30cc9f0.tar.gz dispatch-web-0ab13155b0d32a6062797b3f3da1c093b30cc9f0.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.ts | 7 |
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). |
