Repository navigation
feat(console): Chat with Claude — read and talk to the live session from the console (0.44.0) - #4041
socrates6969 wants to merge 13 commits into
Conversation
Host.session.messages() maps the main conversation's SessionMessage rows to
ChatMsg { role, text, tools } (tool names only; tool inputs, toolResults and
the engine handle are dropped). Host.session.id() passes the session id
through. submitPrompt is reused unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ut the screen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new Chat page (SWARM, "start here") draws the live conversation the chat store mirrors: the last messages framed as you / claude, a
tool-only answer as "… used <tools>", cut messages with the cut mark, the streamed answer as a live "Claude is writing…" block, the
pending send ("sending…" / "queued — sends when Claude is free") and the send error, and a focused Send field (chat-send) that calls
actions.chat.send.
Reached from the menu, the page tabs, the palette (view-chat), /ruflo chat and a band link; no hotkey (every letter is taken). The
footer "Ask Claude" button is unchanged.
Redraws are throttled (at most one per 200 ms, only while the console is open on Chat) and the page is bounded: newest 50 messages,
each cut for the screen, 400 rows. The conversation is re-read when Chat opens, when a turn starts, after a send settles and when a turn
ends.
Privacy (ADR-486): console_state / text answers get counts only; chat joins Ask Claude's NOT_SHARED; with the sessionPreview setting
off the page shows only "Chat is hidden: Settings → Session preview" and reads nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chatLive(state) = session preview on, console open, Chat shown. The turn-start and turn-end reads of the conversation, the chunk redraws, the after-send refresh and the focus of the Chat field all go through it; the streamed partial is still kept and cleared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README section, CHANGELOG 0.44.0, version bump to 0.44.0 (plugin.json, hooks/version.ts, scripts/smoke.sh) and a Chat clause in the plugin description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rompt
- toChatMsgs drops rows with nothing to draw: the user rows that carry only
tool results and the empty assistant rows. A tool loop no longer draws an
empty "you" frame per round-trip, and those rows no longer eat the 200 kept
and 50 drawn slots. Tool-only assistant rows stay ("… used <tools>").
- Host.submitPrompt resolves { isDropped: true } when prompt.submit answers
{ drop }, never carrying the hook's reason.
- The stale comment on submitPrompt now says it resolves as its own turn
starts (reference.md), not when it ends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is cleaned
- A send's refusal lives in its own sendError, cleared only when the next
send starts; the re-read that follows every send clears only the read
error, so a refusal no longer vanishes right after it is drawn.
- The Send field is controlled by an in-memory draft beside the chat store
(never in the snapshot or the Chat object): an accepted send empties it
(unless something new was typed meanwhile), a refusal keeps the text.
- A repeated Enter while a send is pending shows "already sending — wait for
it" instead of nothing; a hook's { drop } reads "not sent: a hook declined
it" (never the reason or the text).
- Every drawn message line, tool line and streamed line goes through the
terminal's termText: escape, control, bidi and invisible characters gone,
x.ruv.io invite codes masked.
- With Session preview off appendPartial holds nothing of the streamed reply.
- A later step of the same turn starts on a new line in the streamed reply.
- Specs for all of the above, plus chatStep's early close (upstream finally
runs) and an upstream throw propagating.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Through the real console with `claude plugin test`: opening Chat shows the conversation with no empty frame for a tool result; Enter submits once as a turn of its own, a repeated Enter says so, and the field empties once the send is taken; a refusal stays on screen after the re-read and the field keeps the text; console_state carries counts and no conversation text; with Session preview off no message text is drawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README and the 0.44.0 CHANGELOG bullets: tool-result rows are not shown and every line is cleaned as on the terminal page; the field empties once a message is taken; a repeated Enter says "already sending"; a refused or hook-declined message keeps its "not sent" line until the next send and its text in the field; with Session preview off not even the streamed reply is held; the answer after a tool call starts on a new line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adversarial review at
|
… view lists: chat beside themes)
…es, kit test excluded, register.ts and controller.ts back under 500 lines, chat wiring helpers Co-Authored-By: RuFlo <ruv@ruv.net>
Draft until a manual check in a live session: open Chat (
/ruflo chat, the menu or the band link); send "say hi in five words" — the reply streams into the pane and appears once in the transcript; a tool-heavy prompt shows Claude's "… used " lines with no empty "you" frames; a secret-shaped message is refused and stays on screen with the text kept in the field; a send while Claude is busy reads "queued".What
A Chat with Claude page that mirrors the live Claude Code session and lets the person type to it.
$.session.messages()(role, text and tool names only — tool inputs and results never leave the engine). Text-less tool-result rows are dropped; a tool-only reply shows "… used ". Newest 200 kept, 50 drawn (400 rows), long text cut with "… cut". Every drawn line goes through the console's owntermTextcleaning (escape, control, bidi and invisible characters stripped; x.ruv.io invite codes masked).turn.stepobserver (main session only) uses the documented transform pattern — every chunk is yielded unchanged and in order,stream.resultreturned, close/throw propagated, store errors caught — and the page redraws at most every 200 ms.$.prompt.submitwithasUser, so Claude reads it as the person's words). While a turn runs it reads "queued — sends when Claude is free"; a repeated Enter never sends twice ("already sending — wait for it"). The field empties once a send is taken and keeps the text after a refusal. Secret-shaped text is refused (AIDefence screen when on; a local secret check when it is off or unavailable); a prompt another hook declines reads "not sent: a hook declined it". Every send is a normal, billed turn.view-chat),/ruflo chatand a "Chat" link in the band. The footer "Ask Claude" button is unchanged.Privacy (ADR-486 rules)
The conversation is read only while Session preview is on and the Chat page is open in the pane (plus one read when it is opened); nothing is held with Session preview off. Nothing of it is written to disk, put in
console_statetext answers (counts only), sent to a model by the console, or shared by "Ask Claude about this view" (NOT_SHARED). The store is a side table keyed by the console state, never in snapshots, persistence or exports.Tests
chat-host,chat-store,chat-send,chat-gate,chat-view(incl. stream pass-through, early close and upstream throw, throttle, cleaning, gates, privacy) — all pass.claude plugin test): newtests/chat.test.ts5/5 — opening shows the conversation with no empty frame; Enter submits once and the field empties; a refusal stays visible and keeps the text;console_statecarries counts only; Session preview off draws no text. No other kit test changed status.claude plugin validate plugins/ruflo-consolepasses (new engine calls:$.session.messages,$.session.id,turn.step).Known follow-ups
/ruflo go chatarrives with the navigation PR (feat(console): easier navigation — real Back, one name per page, /ruflo go, instant refresh (0.43.0) #4039); conflicts with fix(console): ruflo-console works on Windows (project paths, home folder, disk writes) — 0.42.2 #4036 and feat(console): easier navigation — real Back, one name per page, /ruflo go, instant refresh (0.43.0) #4039 (register.ts,pane.ts, version) are resolved by whichever merges later.🤖 Generated with Claude Code