Repository navigation
Steer or queue messages mid-turn, and fix Shift+Enter, chat scrolling and questions - #150
Merged
Merged
Conversation
…ns take your own answer - Shift+Enter starts a new line in Home and the chat: the textarea reports it as Enter too, so both now send only through `composer::sends`. - The working status moves from the message box to the foot of the chat. - Messages waiting for the turn to end show above the message box, where they can be edited or removed. - The user's messages render as Markdown and keep their line breaks. - A question's highlight follows the arrows and the mouse, and Enter picks it. Claude Code's questions take what is typed in the message box as the answer, through `_meta.m4code` on the permission request and its reply.
Settings → General picks Steer (the default, as in t3code) or Queue, and Cmd/Ctrl+Enter does the other for one message. Slash commands and messages during compaction always queue. - Claude Code takes a steer in its running turn through the bridge's `_m4code/steer`. The bridge stamps every message with a uuid and keeps the ACP turn open until Claude's results have answered each one. A steer Claude drops by itself comes back in `_meta.m4code.resend` and goes as the next message. One the user stopped before Claude read it comes back in `_meta.m4code.unread`, shows as a notice, and its own turn is stopped too. - Codex, OpenCode and Antigravity stop their turn and start again with the message.
The menu drops its outer panel and sits on the window's background, and each section is a card drawn like the chat's panel, so cards no longer sit inside a card. Dragging a card over another moves it there, the way session rows reorder. The order is saved in `layout.right_cards`. A blank card holds a place for later.
`TextView::markdown` kept its parse in frame state, which GPUI drops when a row scrolls out of the list. A message that came back into view parsed again, and one over 4 KB parses in the background, so it drew empty for a frame and then grew, moving everything around it. The chat now holds each entry's `TextViewState` and draws it with `TextView::new`; `github::ui::styled_markdown` gives both kinds of view the same look.
Upstream gpui-base fits the box behind inline code to the capital height plus some padding, so in fonts with deep descenders g, p and y reach past it. The patched `code_background` uses the code's ascent and descent instead. The Cargo.toml patch notes say so.
A steer went into the chat the moment it was sent, while Claude was still writing. The rest of that reply then landed after the user's message, so the reply looked cut off and its end looked like the answer to the steer. The bridge now sends a steer at "next" priority, as t3code does, so Claude finishes its current step first. Once Claude reads the steer, the bridge emits it as a `user_message_chunk` marked `_meta.m4code.steer`. Until then the chat holds it above the message box. A steer still unread when the agent exits becomes a notice.
- Bridge: - A new message waits, up to 10 s, until the steers the user stopped have run and been stopped. Clearing them let one run in the new turn and fail it. - A turn still open when Claude Code's stream ends is rejected rather than left working. - After a held result, only the oldest waiting steer shows as read. - Chat: - A steer the turn ends without reading, as when it fails, becomes a notice instead of disappearing. - Each steer is its own message, even right after another one. - Steers for an agent that restarts keep their order, ahead of the queue. - A running slash command such as a manual /compact can't be steered into. - The slash menu stays closed while a question takes the typed answer. - Replay drops the parsed markdown along with the entries. - Queue buttons get new ids when messages move. - Fences close only on a marker as long as the one that opened them. - Sidebar: a card moves only once the pointer passes the middle of the card it goes over, so cards of different heights no longer swap back and forth.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…their data folder `a_process_that_ends_closes_the_session_and_leaves_its_worktree` isn't ignored, so it ran beside the unit tests and set `M4CODE_DATA_DIR` to its own folder while the worktree tests read theirs. It failed CI on Linux, including on main. The test now uses the run's one throwaway folder (`datadir::use_throwaway_folders`) and finds its project by path. Part of #149: the ignored headless tests still set the variable, though they run on their own.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Messages sent while the agent worked vanished until the turn ended. Shift+Enter sent the message instead of starting a new line. The chat jumped while scrolling, and questions had a fixed highlight with no way to type an answer. This branch fixes those and adds the related changes the maintainer asked for.
Changes
composer::sends._m4code/steerat priority "next". The chat shows it where Claude reads it.ask_usertake the typed text as the answer. Elicitation fields don't, since their answer must match the schema.layout.right_cards.vendor/gpui-base.Evidence
cargo clippy --locked --all-targets -- -D warningsis clean.cargo test --locked -- --test-threads=1passes 481 tests, run twice. The vendoredinline_codetests pass, 16 in all.Agent("Hello wor"), User("stop"), Agent("ld."), and passes now.All three failed on the earlier bridge and pass now. The script isn't committed, because the bridge has no test setup.
Risk
claude. It relies on the SDK'suser_message_uuids,command_lifecyclemessages and interrupt receipt.