Repository navigation
Conversation
Quitting during a running turn saved nothing from that turn, so a new conversation lost its prompt and partial answer. Next now stops the worker, waits up to 2 seconds and saves what it holds. Deltas still queued after a cancel restarted the turn on screen, so further Ctrl+C presses cancelled again instead of reaching the exit sequence. Next now ignores them until the runtime settles, which also makes a cancelled flood cheaper to drain. Adds a tmux case that sends a real burst through the client and query loop, and corrects the docs on how Ctrl+D exits and what is saved. Classic is unchanged. Refs #408
2 of 8 tasks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 4, 2026
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.
Summary
Sends a real flood of text deltas through the real client and query loop, and fixes the two problems it found in Next. Classic's behaviour is unchanged.
The second fix also makes a cancelled flood much cheaper (release build, Next, one host, 120x40, 1,000,000 deltas, 2 runs each):
b3c952fTwo runs are too few to read anything into the Escape difference, and these rates are far beyond any real provider.
Context
deltas_still_queued_when_a_turn_is_cancelled_cannot_restart_itpins Classic's late-delta handling, and a probe confirmed that quitting Classic mid-turn still saves nothing.Behaviour to check
sleepdid not react to cancellation: exit took about 2.3 s against 0.3 s on main, and only the prompt was saved because the tool had produced no result yet. The tool did not finish after quit, on either build.Docs
docs/keybindings.mdsaid one Ctrl+D exits and that it signals EOF when the prompt has content. It takes two presses within 2 seconds, and it does nothing while the prompt has content.docs/commands.mdsaid unsaved state is flushed on exit, which wasn't true of a running turn. It now says what each renderer does.Validation
deltas_still_queued_when_a_turn_is_cancelled_cannot_restart_it, and the two "keeps the prompt" and "keeps the partial answer" checks, failed before their fixes.scripts/tui-tests/run.sh event_flood: 19 passed, 0 failed.cargo fmt --all --check,cargo clippy --workspace --all-targets --locked -- -D warnings.cargo test --workspace --locked: 2916 passed, 0 failed.git diff --checkis clean.Not tested: Windows, Linux, or a real provider. On a fast release build a 300,000-delta burst can settle before the later Ctrl+C presses, so that part of the case only has teeth on a debug build, which is what
tui-tests.ymlruns. The unit test covers the same logic on any build.