diff options
| author | Adam Malczewski <[email protected]> | 2026-06-07 18:41:27 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-07 18:41:27 +0900 |
| commit | 9a4fc0aa0b56e7bb083ecc615647ed8f6b2ef4c2 (patch) | |
| tree | 1fd5b4081736cf48c7b916abcdbeab267b4322d6 /src/features/chat/index.ts | |
| parent | dcf5a2993c9cbeb266f2629cf33fbc43f52c7ca8 (diff) | |
| download | dispatch-web-9a4fc0aa0b56e7bb083ecc615647ed8f6b2ef4c2.tar.gz dispatch-web-9a4fc0aa0b56e7bb083ecc615647ed8f6b2ef4c2.zip | |
feat(chat): live turn metrics — telemetry reducer + rendering
Consume wire/transport-contract 0.3.0 (step-complete event + timing
fields on usage/tool-result/done). Pure core/telemetry module:
foldMetricEvent (reducer) + derived selectors (stepTps, turnTps, etc).
TelemetryState is pure data, no active-turn tracking — consumers pass
turnId to selectors. ChatStore wires foldMetricEvent into handleDelta
and exposes telemetry + currentTurnId. ChatView shows step-metrics
footer (time/TPS/tokens) on assistant text bubbles and durationMs badge
on tool cards. New TurnSummary component renders turn-level stats
(wall-clock, tokens, steps, TPS) in a DaisyUI stats block. Extended
live-probe to verify telemetry events against bin/up (pending backend
restart). 336 tests, typecheck 0, biome clean, build ok.
Diffstat (limited to 'src/features/chat/index.ts')
| -rw-r--r-- | src/features/chat/index.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/features/chat/index.ts b/src/features/chat/index.ts index 4f2091a..b096cca 100644 --- a/src/features/chat/index.ts +++ b/src/features/chat/index.ts @@ -1,8 +1,10 @@ export type { RenderedChunk, RenderGroup, ToolBatchEntry } from "../../core/chunks"; export { groupRenderedChunks } from "../../core/chunks"; +export type { StepMetrics, TelemetryState, TurnMetrics } from "../../core/telemetry"; export type { ChatTransport, HistorySync } from "./ports"; export type { ChatStore, ChatStoreDependencies } from "./store.svelte"; export { createChatStore } from "./store.svelte"; export { default as ChatView } from "./ui/ChatView.svelte"; export { default as Composer } from "./ui/Composer.svelte"; export { default as ModelSelector } from "./ui/ModelSelector.svelte"; +export { default as TurnSummary } from "./ui/TurnSummary.svelte"; |
