Review follow-ups for #1103:
- crates/ui is back to main (the desktop is apps/zgx now), but for the
`preview_paths: Vec::new()` its initializers need to compile. The engine
still names stored copies on the tool part; zgx reads them (#1186).
- A stored picture is named `tool-<chat>-<sha256 of its bytes>`: the same
picture again in a chat (another Read, another subagent) is one file
rather than a copy per call, and a chat's pictures share a prefix for
whatever clears a chat's away. Uploads keep them as before.
- Only the CLI's own image note is bookkeeping: one line, `[Image: source:
<path>]` or `[Image: original WxH, displayed at WxH…]`. A steer that just
starts with `[Image: ` and ends with `]` reaches the subagent.
- `is_meta` and `tool_use_result` also read as the live stream spells them.
- docs/image-preview.md says what the engine does and who reads it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tool chips named a scratch path outside the attachment jail, so the
preview read failed and the chip showed Image unavailable. Image
bytes already present on the tool result are now stored in the
profile uploads directory and the chip previews that copy.
A subagent image note about the displayed size was folded as a steer
and the pixels were dropped. That note is ignored, and the same
stored preview is used on the subagent transcript.
* Agents can show local images in chat: show_image, and Markdown images in replies
show_image {path} (Zeron MCP) copies a PNG/JPEG/WebP/GIF into uploads and
publishes the image part Codex's generated images use, so every client
already renders it and it outlives the file.
An agent reply's  now draws the image in place, read live by the
chat's host through ReadChatImageChunk: strictly inside that chat's folder,
no link followed, no URL fetched, extension and bytes checked, decoded within
the shared raster limits. Anything refused keeps today's link.
* Chat image folder tests: refuse the filesystem root portably
On Windows `/` isn't absolute, so it was refused as "not an absolute
path" instead of as the root. Test the root of the temp dir's own path
(`/`, or a drive like `C:\`) instead.
* Retrigger CI: cursor_shim frame timeout on the Windows runner
* Reply images: right-click copies the original, and narrow columns scale them whole
Rebased onto main (Origin's new side_chats_only in the show_image test).
- A Markdown image in a reply now opens the shared Copy path / Copy image
menu, like generated images and tool previews. Copy image reads the
original through ReadChatImageChunk under that chat's jail, not the wider
ReadAttachmentChunk, and not the downscaled preview.
- The image row keeps its aspect ratio when the column is narrower than the
image, instead of keeping its height and letterboxing.
- docs/image-preview.md: the menu, the sizing, and what the cache means for a
Markdown image whose file changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
---------
Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
* Embed the browser on Windows and preview images in tool calls
- Browser tabs render pages inside Zeron on Windows (WebView2), matching macOS and Linux.
- Expanded tool calls preview the images they touch and free them on collapse.
Right-click any transcript image to copy its path or the image itself.
- Paths, commands and output in expanded tool calls can be selected and copied.
- Fix: answering an agent question with multiple lines now grows the card instead
of spilling text below it.
* Address review: repin zui upstream, harden the Windows browser and previews
- Depend on zeronsh/zui dce5c1f (zui#15 merged) and gpui-component
47ccd07 instead of patching every gpui crate to a personal fork.
- Tool image previews: refuse UNC/device/drive-relative paths in the UI
and, before any filesystem call, lexically jail requested paths in the
engine (canonicalizing \\host\share opened an SMB session and leaked
the user's NTLM hash); read chunks on the blocking pool; bound decodes
with the shared raster limits; release keys a chip stops showing;
decode base64 off the UI thread; copy sanitized SVG; cap output lines.
- Windows browser: fail closed on unreadable navigation targets; police
subframes and cancel external-scheme launches; open tabs only for
user-initiated popups (handled first); deny permission requests;
disable web messages and host objects; cancel downloads silently
unless the page itself is the file; recover from a browser-process
exit on Reload; give each BrowserData its own InPrivate profile (no
persistent fallback); sweep only folders of exited processes; never
remount from an older composition generation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>