Feat/steering queue messages while reponse streams#3379
Closed
wviana wants to merge 2 commits into
Closed
Conversation
Owner
|
This is genuinely well-built 鈥?good test coverage, and skip-pending-tools-on-steer is the right call. Closing only because it targets the v1 (TypeScript) line, which is feature-frozen: npm |
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
Adds mid-turn user steering — when the model is busy executing tool calls, the user can type messages that are queued and injected into the next model call, allowing course correction without having to wait for the current turn to finish.
What changed
New: Message queue during busy turns
Previously, when the model was busy (e.g. running a chain of shell commands or file edits), the prompt was disabled and user input was blocked. Now:
QUEUEindicator above the promptNew: Skip pending tool calls on steer
When a steering message arrives mid-turn, remaining tool calls in the current dispatch batch are skipped and the model is called fresh with the steering input — avoiding stale tool prompts after the user already changed direction.
New:
user.queuedevent in TUI historyQueued messages appear as user cards in the conversation history, keeping a complete record of steering interactions.
New:
QueueIndicatorcomponentA compact indicator above the prompt showing how many messages are queued and a preview of the most recent one.
Files changed
src/loop.ts_messageQueuefield,queueMessage()method, drain logic before each model call, skip-tools check in dispatch loopsrc/loop/types.tsuser.queuedevent rolesrc/core/eventize.tsuser.queuedcase to produce cardssrc/cli/ui/App.tsxhandleSubmit,user.queued→log.pushUser,messageQueuestate + clear-on-idlesrc/cli/ui/ComposerArea.tsxQueueIndicatorrendering,queueMessagespropsrc/cli/ui/PromptInput.tsxQueueIndicatorcomponentsrc/cli/ui/hooks/useMessageQueue.tssrc/server/api/submit.tsqueuedflag in submit responsesrc/server/context.tsqueuedtoSubmitResultsrc/i18n/EN.ts,zh-CN.ts,types.tsqueuedSteerPendingstringtests/loop-user-queue.test.tstests/use-message-queue.test.tstests/prompt-input-queue.test.tsxQueueIndicator+ disabled propTesting