Agent panel: resolve file:// image URLs and fall back to a link for unresolved inline images #64801
nad182
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Make inline images in agent responses more forgiving: resolve
file://URLs in, and fall back to a clickable link instead of bare alt text when an image can't be resolved.Current behavior
Zed 1.21.0 (stable), macOS. The agent panel already renders
,andinline (resolve_agent_imageincrates/agent_ui/src/agent_ui.rs), which is great. Two gaps make it easy to miss in practice:is not resolved. The panel shows only the textdev_auth screen, with nothing to click.file://is the form agents naturally produce, because the same panel renders[name](file:///...)links as clickable, so instructions like "usefile://links for files" spill over into image syntax. I hit this myself and first thought images were not supported at all.dest_urlwould at least let me open the file in a tab.Attaching images to the agent works fine, this is only about images in the agent's output.
Expected behavior
resolve_agent_imageacceptsfile://URLs (strip the scheme, percent-decode, then treat as an absolute path).dest_urlas target) instead of bare text.[](file:///abs.png)double-wrap to get click-to-open.Why
Agent workflows often end with a screenshot: browser QA through the Playwright MCP, visual regression checks, before / after captures for PR descriptions. The rendering is already there; it just needs to accept the URL form agents produce and degrade to a link instead of silently dropping the image.
I'm happy to open a PR for this if it sounds right.
Related but different: #58491 (image mentions in restored threads), #50658 (pasting images into the panel), #64352 (drag-and-drop attachments). Those are about input, not rendering agent output.
All reactions