fix(response-viewer): open markdown links to file paths in the preview, not as a same-origin URL

Codex cites files as [label](/abs/path). The chat view gave those links target=_blank, so a click opened <origin>/abs/path and landed on a Fastify 404. Path-shaped hrefs now take the linkified-path shape the file preview already opens; scheme, protocol-relative and fragment links are unchanged.
This commit is contained in:
JD committed 2026-10-18 14:33:26 -04:00
1 parent e63bb65b36
commit 6f785e116f
4 files changed
+104 -3

No files matched your search

+2 -1
View File
@@ -84,7 +84,8 @@ File paths in a session are links. That works in two places:
- **In the terminal**, on any absolute path an agent prints.
- **In the response viewer**, where paths are usually written as prose or in backticks. They
render as underlined monospace links.
render as underlined monospace links. A Markdown link whose target is a path
(`[report](/tmp/run/report.json)`, the way Codex cites files) opens the same way.
Clicking one opens it in the preview: images and PDFs render, video and audio play with a
working scrub bar, documents convert, text shows inline, Markdown renders and HTML opens as a