From ce1321eccf24e0923642ae2ef74f6220ecd7f75a Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Mon, 22 Jun 2026 14:40:57 +0900 Subject: feat: collapsible tool output (collapsed by default like thinking) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/features/chat/ui.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/features/chat/ui.test.ts') 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). -- cgit v1.2.3