summaryrefslogtreecommitdiffhomepage
path: root/src/core/chunks/selectors.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-07 17:14:40 +0900
committerAdam Malczewski <[email protected]>2026-06-07 17:14:40 +0900
commit2e79dd122e5664353e02e0d33715ae8c1041a379 (patch)
tree737822344118e5c1c840b8399a554a1898f07093 /src/core/chunks/selectors.ts
parentc8c86dbc3fd23001cca7904791ab539300ec60f4 (diff)
downloaddispatch-web-2e79dd122e5664353e02e0d33715ae8c1041a379.tar.gz
dispatch-web-2e79dd122e5664353e02e0d33715ae8c1041a379.zip
feat(chat): restyle thinking — visible bubble, collapse, title swap, persisted open
Thinking renders inside a visible rounded-card bubble (like tool calls), capped to the same max-w-5xl column as assistant text. Uses a DaisyUI checkbox collapse (no arrow/plus icon) with smooth animation. Title reads "Thinking" + loading-dots while the model is actively generating, then flips to "Thoughts" with no dots once done. Open/closed state persists across the generating→completed→sealed transition via stable ordinal keys (per-conversation isolation via {#key} in App). Added optional streaming flag to RenderedChunk (pure selector, only on the accumulating chunk).
Diffstat (limited to 'src/core/chunks/selectors.ts')
-rw-r--r--src/core/chunks/selectors.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/chunks/selectors.ts b/src/core/chunks/selectors.ts
index 8fb832f..839ba65 100644
--- a/src/core/chunks/selectors.ts
+++ b/src/core/chunks/selectors.ts
@@ -18,7 +18,7 @@ export function selectChunks(state: TranscriptState): readonly RenderedChunk[] {
state.accumulating.kind === "text"
? { type: "text", text: state.accumulating.text }
: { type: "thinking", text: state.accumulating.text };
- result.push({ seq: null, role: "assistant", chunk, provisional: true });
+ result.push({ seq: null, role: "assistant", chunk, provisional: true, streaming: true });
}
return result;
}