Repository navigation
Take queued messages back in a Claude chat - #603
Open
thiblahute wants to merge 1 commit into
Open
thiblahute wants to merge 1 commit into
thiblahute wants to merge 1 commit into
Conversation
A queued message has a cross, which takes it out of the queue, and a pencil, which takes it into the box to edit; Up in the empty box takes the whole queue back to edit, as Up does in Claude Code's prompt. Claude Code can only give its whole queue back to the prompt (Up, recorded as popAll). So Roamgate sends Up, waits for the popAll records, empties the prompt with Backspace and Delete (the cursor may be at either end; Ctrl+C and Esc would interrupt the agent) and sends the messages that stay queued again, in order. Only while the agent works: one that is done has taken its queue already, and sending the rest again would deliver them twice.
This branch has not been 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.
Summary
Take a message queued for Claude back from its chat: out of the queue, or into the message box to edit.
Why
Since #553 the chat shows the messages queued for Claude at the end, marked Queued, but a message sent too early could only wait to be read. Claude Code's own prompt gives the queue back on Up.
What changed
AgentHistoryChat.tsx: in a pane's chat on a Claude pane, a queued message has a cross, which takes it out of the queue, and a pencil, which takes it into the box to edit.AgentHistoryComposer.tsx,ComposerVimEditor.tsx: with messages queued, Up in the empty box (plain or with Vim keys) takes the whole queue back to edit.AgentHistoryDrawer.tsx: Claude Code can only give its whole queue back to the prompt (Up, recorded aspopAll). So Roamgate sends Up, waits for thepopAllrecords, empties the prompt with Backspace and Delete (the cursor may be at either end; Ctrl+C and Esc would interrupt the agent) and sends the messages that stay queued again, in order. Only while the agent works: one that is done has taken its queue already, and sending the rest again would deliver them twice.FEATURES.md: the cross, the pencil and Up.Verification
bun test web/src/components/AgentHistoryChat.test.ts web/src/components/AgentHistoryComposer.test.tsx: new tests "a queued message can be taken back or edited when the chat allows it" and Up in the empty box with messages queued (and not with text in the box, nor without a queue); both fail onmain.bun run format:check,bun run lint(only the existingTerminalView.tsxwarning),bun run typecheck:bun,bun run build:web,bun run test:quickwith an isolatedHOME/TMPDIR.Manual checks