Skip to content

fix(dialog): drop dead /api/open-file call from dialog markdown#4

Merged
PolyphonyRequiem merged 1 commit intofeat/agent-dialog-mode-cleanfrom
fix/dialog-open-file
May 4, 2026
Merged

fix(dialog): drop dead /api/open-file call from dialog markdown#4
PolyphonyRequiem merged 1 commit intofeat/agent-dialog-mode-cleanfrom
fix/dialog-open-file

Conversation

@PolyphonyRequiem
Copy link
Copy Markdown
Owner

Addresses microsoft#130 (comment)/api/open-file was supposed to land in microsoft#114, but microsoft#114 is closed, so the click handler in DialogDetail silently 404s.

Going with option 2 from the original review: drop the link rewriting and the (now-unused) isRelativeFileLink guard, render every link as a plain anchor with target=_blank + rel=noopener. External URLs still open in a new tab; relative paths become honest broken links instead of fake interactive ones.

If/when the file-open endpoint comes back in a future PR, the rewriting can return alongside the matching server-side validation (path traversal, symlink resolution, containment check).

Static bundle rebuilt with vite. Pre-existing TS errors on the branch are unchanged.

The DialogDetail component intercepted relative-file links in agent
markdown and POSTed to /api/open-file, but that endpoint was meant to
land in microsoft#114 (closed). Clicks silently 404 and leave users staring at
links that look interactive but do nothing.

Drop the link rewriting (and the now-unused isRelativeFileLink guard)
and render every link as a plain anchor with target=_blank +
rel=noopener. External URLs still open in a new tab; relative paths
become honest broken links instead of fake interactive ones. If/when
the file-open endpoint comes back in a future PR, the rewriting can
return alongside the matching server-side validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PolyphonyRequiem PolyphonyRequiem merged commit 94b446c into feat/agent-dialog-mode-clean May 4, 2026
@PolyphonyRequiem PolyphonyRequiem deleted the fix/dialog-open-file branch May 4, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant