From dcf5a2993c9cbeb266f2629cf33fbc43f52c7ca8 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sun, 7 Jun 2026 17:14:40 +0900 Subject: feat(chat): restyle thinking — visible bubble, collapse, title swap, persisted open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- src/core/chunks/selectors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/chunks/selectors.ts') 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; } -- cgit v1.2.3