From 17bc0a2cdaeefd4974f785c907d3515a38d45363 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sun, 7 Jun 2026 16:22:31 +0900 Subject: feat(chat): group batched tool calls into one DaisyUI list Consume the backend's new stepId grouping key (wire/transport-contract 0.1.0 -> 0.2.0). foldEvent copies event.stepId onto live tool chunks so live and replay group identically. New pure selector groupRenderedChunks (core/chunks) folds a step's 2+ tool calls into one tool-batch group, pairing each call with its result by toolCallId; single/no-stepId calls stay as cards. ChatView renders a batch as a DaisyUI list (list-row per pair). Fixtures updated for the now-required event stepId. --- src/core/chunks/reducer.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/chunks/reducer.ts') diff --git a/src/core/chunks/reducer.ts b/src/core/chunks/reducer.ts index d3b999d..1dcfa39 100644 --- a/src/core/chunks/reducer.ts +++ b/src/core/chunks/reducer.ts @@ -106,6 +106,7 @@ export function foldEvent(state: TranscriptState, event: AgentEvent): Transcript toolCallId: event.toolCallId, toolName: event.toolName, input: event.input, + stepId: event.stepId, }; return { ...state, @@ -122,6 +123,7 @@ export function foldEvent(state: TranscriptState, event: AgentEvent): Transcript toolName: event.toolName, content: event.content, isError: event.isError, + stepId: event.stepId, }; return { ...state, -- cgit v1.2.3