diff --git a/web/claw/README.md b/web/claw/README.md index f29eb09..6c13ed1 100644 --- a/web/claw/README.md +++ b/web/claw/README.md @@ -90,6 +90,11 @@ Two consequences worth knowing before changing this code: ## What the transcript does with the stream +- **Replies, asks and files only.** The stream carries tool calls and + the model's thinking trace; this surface drops both and renders the + reply. A consent card and an attachment card still appear inline, + because the reader has to answer or open them. The mirror still + folds those other events; only the render ignores them. - **Long pastes travel as chips.** A paste over three lines (the TUI's `PASTE_INLINE_LINES`) never lands in the composer; it stages as a droppable chip (`▣1 42L`) and embeds into the sent text as @@ -175,10 +180,10 @@ app/ raw HTML escaped, styles in main.css .md) ClawBanner.vue the one error/notice banner surface ChatPanel.vue transcript: sent lines (paste chips), - streamed turns as bash shell lines and - glyph rows, consent + attachment - cards; the growing composer; agent - replies render through AppMarkdown + streamed turns as reply text plus + consent + attachment cards; the growing + composer; agent replies render through + AppMarkdown SessionsSidebar.vue conversable dispatch keys (phone status keys hidden), interactive first; the + form creates a session diff --git a/web/claw/app/components/ChatPanel.vue b/web/claw/app/components/ChatPanel.vue index 924ff0b..88abfd6 100644 --- a/web/claw/app/components/ChatPanel.vue +++ b/web/claw/app/components/ChatPanel.vue @@ -136,20 +136,12 @@ watch( }, ) -// Thinking grows inside the trailing entry without changing the -// entries length, so its total length joins the watch to keep the -// stream pinned at the bottom. -function liveThinkingLength(): number { - return ( - props.live?.entries.reduce( - (count, entry) => (entry.kind === 'thinking' ? count + entry.text.length : count), - 0, - ) ?? 0 - ) -} - +// A consent or attachment card opening inside the trailing turn +// changes the rendered height, so the reply length and the entries +// length both join the watch that keeps the stream pinned at the +// bottom. watch( - () => [props.items.length, props.live?.reply.length, liveThinkingLength(), props.live?.entries.length], + () => [props.items.length, props.live?.reply.length, props.live?.entries.length], async () => { if (!pinned.value) return await nextTick() @@ -498,7 +490,6 @@ function streamTone(status: StreamStatus): 'ok' | 'warn' | 'error' {
{{ entry.text }}
-