fix: deleted composer images must not reach the model - #635
Closed
justrach wants to merge 2 commits into
Closed
Conversation
Pasted screenshots stayed on the pending-image queue after the user deleted the composer chip, so a text-only submit still sent native vision blocks (and a double-stage could emit four from two pastes). Submit now keeps composer payloads only while [Image], [Image #N], or @[path] remains; /image and /paste stay sticky. Identical b64 collapses. The TUI backspace/Ctrl+U path detaches chips so the composer matches what the request will send. Fixes #634
justrach
marked this pull request as ready for review
August 26, 2026 04:01
Headless -p prints "turn still going" on stdout from model call 2 (ADR 0020). The boundary script required stdout to be exactly the final reply, so CI zig failed after that pulse landed on main.
Owner
Author
|
Already on main via 278 (#634). Closing as superseded. |
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.
Fixes #634.
A screenshot pasted into the composer and then removed before submit was still sitting on the pending-image queue. The visible prompt looked text-only; the first user message still carried native
input_imageblocks. Two pastes could also become four blocks (same payload twice).What changed
[Image #N]and mark the slotfrom_composer.consumePromptImageskeeps those payloads only while[Image],[Image #N], or@[path]is still in the prompt./imageand/pastestay sticky. Command-staged images still ride the next text-only line./image clearnow clears the whole queue, not just the last slot.b64collapses so a double-stage cannot emit four blocks from two pastes.@[path]restage skips a path already in the queue.xdetaches the previewed chip.Tests
input_imageblocks[Image #2]keeps only that slotb64→ one block/image-style (no composer flag) still sends with a text-only promptTier 1 green on push (1684 unit tests, 436 TUI).