diff options
| author | Adam Malczewski <[email protected]> | 2026-06-07 16:22:31 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-07 16:22:31 +0900 |
| commit | 5f05fe5e6914a92c180781900ccb1615f233deab (patch) | |
| tree | 4ce3eb430f72da1568212fbb77f19404e763e914 /src/core/wire | |
| parent | 88d2fbfee9fb55fa3bbb5c8708cfba82720c1fba (diff) | |
| download | dispatch-web-5f05fe5e6914a92c180781900ccb1615f233deab.tar.gz dispatch-web-5f05fe5e6914a92c180781900ccb1615f233deab.zip | |
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.
Diffstat (limited to 'src/core/wire')
| -rw-r--r-- | src/core/wire/conformance.test.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/wire/conformance.test.ts b/src/core/wire/conformance.test.ts index c0f276f..50b7f35 100644 --- a/src/core/wire/conformance.test.ts +++ b/src/core/wire/conformance.test.ts @@ -1,5 +1,5 @@ import type { ChatSendMessage, ConversationHistoryResponse } from "@dispatch/transport-contract"; -import type { AgentEvent, StoredChunk } from "@dispatch/wire"; +import type { AgentEvent, StepId, StoredChunk } from "@dispatch/wire"; import { describe, expect, it } from "vitest"; import { assertAgentEventExhaustive, @@ -36,6 +36,7 @@ describe("classifies every AgentEvent type", () => { toolCallId: "tc1", toolName: "read", input: {}, + stepId: "t1#0" as StepId, }, { type: "tool-result", @@ -45,6 +46,7 @@ describe("classifies every AgentEvent type", () => { toolName: "read", content: "ok", isError: false, + stepId: "t1#0" as StepId, }, { type: "tool-output", |
