Repository navigation
Conversation
Image content blocks reached the model and the session record, but the transcript treated an empty text body as no output. Keep bounded image metadata on the wire and show the count, type, and whether preview or the display limit is why the bytes are not on the page. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
Unpaired text results were given a second tool-output region, which broke setup call pairing. Only results that contain image evidence use that region. Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com>
|
Manual check of the same real Web session on both revisions. No UI fixture and no injected transcript. Each side ran The browser typed “Please read shot.png.” and the transcript below is that settled turn. Before, main 708a44b transcript after reading shot.png After, PR 56dbd5a transcript after reading shot.png No code change from this check. |
Problem
Fixes #471.
A tool result that contains only a Pi image content block was projected to an empty string. The Web transcript then showed that result as a successful call with “no output”, even though the model had received the image. Text mixed with images kept the text and dropped the pictures. Unsupported blocks and images past the display budget disappeared without a separate explanation.
Value
The operator can check the same visual evidence the model received: how many images, their media types, and whether the page is omitting bytes because preview is unavailable or because the image exceeds the 10 MB display limit. A failed tool stays failed. An actually empty result still says it has no output.
Approach
projectMessagealready omitted image bytes. It now also keeps a bounded media type and name, marks payloads over the existing prompt-image budget asbytesOmitted, and counts retained blocks it cannot render asunsupportedParts. Snapshot and live tool events both use that projection.The transcript summary for
readand other tool results shows that evidence directly. The body lists each image and states that bytes stay in the session and are not placed in the page. No new file access and no base64 in the DOM or snapshot.Validation
tests/web/tool-result-images.spec.tsrenders the realTranscriptwith the reported image-onlyreadresult. Before the UI change the visible summary wasreadReadshot.pngReturnedand did not mention the image. It now requires the image count, media type, preview or display-limit state, success versus failure, and the absence of the image bytes. All 7 cases pass.tests/web/protocol.test.tschecks the same projection drops image bytes and counts an unsupported block.tests/web/tool-result-images.e2e.tsloads an isolated in-memory session throughWebHostand checks the built UI after refresh. The image summary is visible, the payload is absent from the snapshot and the page, and a reload keeps the same evidence.tests/web/plan-card.spec.tsandtests/web/app-render.spec.tswere re-run after the follow-up that keeps a text-only unpaired result on its existing output row (138 tests, all passed).bun run checkpassed, including the committed Web build.bun run teston Node 22.14 stopped intests/extensions/shared/setup-config.test.tson an ExperimentalWarning about type stripping (node:7555). That warning is from this VM’s Node, which is older than CI’s 22.19.0, and the assertion is unrelated to image tool results. The node suite otherwise reported 2658 pass / 1 fail / 9 skip and did not reach Vitest. CI on 22.19.0, 24, and 26 is the full-suite check.Impact
unsupportedPartsandbytesOmittedare additive.