Repository navigation
A chat view for Claude sessions: the conversation rendered, with a message box (opt-in) #858
irisitymichaelgrundberg
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
Hey Michael, thanks for the contribution, so I did read it carefully and keep it short as Im on travels atm. To your Questions Is a chat view over the terminal OK in principle, opt-in per device with the terminal as the Yes Are the new route, state fields and SSE events fine on /api/v1? Yes Are the three extra hooks OK in every Claude workspace, including those where nobody uses the No, lets find a better solution for this! The branch is about +6,950 lines across 60 files, about 3,050 of them tests. Is one PR OK, or Lets split it up! |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I read my Claude sessions in the terminal, but a fixed-width font and output lines that run the full
width of the screen are slow to read, and over a long day they wear me out. The Response Viewer
renders the same answer as markdown in a proportional font with boxed code blocks, and my brain
reads and decodes that much faster. Its problem is that it's a sheet I open on demand. It doesn't
update while Claude works, and I can't send a prompt from it, so I keep switching between it and
the terminal.
I built a chat view that puts the same rendering in the main area, keeps it live, and adds a
message box under it. The agent still runs in its tmux pane, and respawn, Ralph and auto-compact
work as they do now. Only the way the browser shows the pane changes. I've had Chat as my
default view for a few days of daily work, in Firefox. It's on the
feat/chat-viewbranch of my fork, and I'm holding the PR until you've had a look.
What it does
terminal, and
Alt+Shift+Cdoes the same. This browser remembers the choice per session."Show the Chat / Terminal switch" is on by default. Phones get neither.
last-response?context=full, drawn byits markdown pipeline. Each block of an answer appears as soon as Claude writes it to the
transcript. A status line under the last message says what Claude is doing, such as "Reading
src/session.ts", "Running npm test" or "Compacting conversation".
POST /api/sessions/:id/inputwithuseMux: true, so a promptgets the same submit check as one sent over the API. A stop button sends Esc. Attach,
drag-and-drop and paste reuse the prompt upload route.
/opens a menu of slash commands. It lists Claude Code's built-ins, the skills thetranscript names, and the skills and commands on disk. A bare
/clearempties the thread, abare
/quitcloses the session, and a bare picker command such as/modelshows the terminal.prompt becomes the box's placeholder, and
Tabfills it in. It is never sent on its own.button that switches to the terminal. The box sends nothing until the dialog is answered.
Remote SSH and adopted sessions keep the terminal. So do the tile grid, the second pane of a
split, phones and every CLI other than Claude.
What it adds to the server
Each of these adds to an existing surface, and existing callers get what they got before:
GET /api/sessions/:id/slash-commands, which returns the/menu's list.SessionStatefields:statusLine,promptSuggestionandcompacting. Thesuggested next prompt is read off the pane after a turn ends, because Claude Code writes it
nowhere else.
transcript:update(at most one per 750 ms per session),session:statusLine,hook:conversation_cleared,hook:compact_startedandhook:compact_finished.clearmatcher,PreCompact and PostCompact. They only report to the server, and they are installed whether or
not the chat view is on.
renderedfield on the statusline exporter's post, which carries a base64 copy of theuser's statusline output. The server keeps only its text, line breaks and colours.
A full read of the conversation also starts a transcript watcher for a session that has none,
such as one picked up after a server restart or one with workspace hooks off. Those sessions then
update mid-turn too.
Known limits
probe and keep-warm already do. Moving every screen read to an async capture is a follow-up I'd
send on its own.
Reading from a cursor is phase 3 in the design note,
docs/chat-view-plan.mdon the branch.Later phases
This PR would be phase 1 of the three in the design note. Phase 2 adds answer cards for permission
prompts and questions in the conversation, and one expandable summary line per turn for its tool
calls. Phase 3 reads the transcript from a cursor and brings the chat view to remote SSH sessions,
Codex, DeepSeek Harness and phones. Each would be its own PR.
Questions
default?
/api/v1?chat view?
would you rather have the server parts first: the hooks, the SSE events and the route?
If it's a yes in some shape, I'll send it as one PR referencing this thread.
All reactions