Repository navigation
[Feature]: Show images the agent references in its reply inline in Chat, including on remote Orca servers #27316
Description
Problem or use case
When an agent in the structured Chat view creates or edits an image and points to it in its reply, Orca shows only a text link. In my case a Codex chat running on a paired remote Orca server edited an image and replied with "Done … Download the edited image". To see the result I had to click through to an editor tab or copy the file off the server.
Images the agent sends as image parts already render as thumbnails, read from the machine the chat runs on. Images it names in the reply text don't:
- A markdown link to an image file (
[edited image](/path/out.png)) stays a plain link. - A markdown image with a file path (
) is handed to a plain<img>as-is. Nothing reads it through the chat's host, so on a paired server or SSH host the file can't load on the desktop.
Where this happens (read on main at ddcbb78013):
src/renderer/src/components/sidebar/comment-markdown-element-renderers.tsx:309: the document-variantimgrenderer that Chat replies use passessrcstraight to<img>.src/renderer/src/components/sidebar/CommentMarkdown.tsx:64: the URL transform keeps path-stylesrcvalues unchanged; nothing routes them to the chat's host.src/renderer/src/components/native-chat/NativeChatAssistantMessageRow.tsx:68: image blocks, by contrast, go throughNativeChatImageAttachmentswith the chat's runtime context.
#26103 listed this as a deliberate v1 limit: "Local images by path are not inlined".
Proposed solution
In structured Chat replies, when a markdown image points to a file path, show it as a thumbnail read from the machine that owns the chat, using the same read path image attachments already use (useLocalImageSrc and the runtime file preview). Clicking opens the existing image lightbox.
- Cover local chats, chats on a paired remote Orca server, and direct SSH workspaces where the read is supported.
- Optionally, a plain link whose target is an image file (png, jpg, gif, webp) could show the same thumbnail under the link, since agents often write "Download the image" rather than
![](). - Keep the current safety rules: no fetching http(s) image URLs the agent picked, only files on the chat's host, the existing size limit, and fall back to today's link when the read fails or the path is refused.
Alternatives or additional context
- An agent can already write an inline HTML visual (
::orca-visual, feat(native-chat): show agent-written visuals inline in structured chats #26103) with the image embedded asdata:, but that means base64-encoding the file into a page just to say "here's the edited image". - Related but different:
- [Bug]: Structured native chat shows Codex images as labels only (no thumbnail) on Windows #25618 / fix(native-chat): preview a Codex image in a local runtime home outside the worktree #25914: Codex image blocks outside the worktree; that fix covers local hosts only.
- feat(native-chat): show agent-taken screenshots on desktop and mobile #23665: screenshots inside tool results.
- [Feature]: Preview pasted image, file, audio, and video addresses in Chat UI #27219: previews paths the user pastes into the composer.
- fix(mobile): render relative Markdown images from the paired host #25594 and [Feature]: Open mobile Chat artifacts and share supported media with the system #25871: the same idea on mobile.
- Seen on Orca 1.4.223, macOS client paired to a Linux Orca server.
Activity