Skip to content

feat(web): file mentions now open files in the editor#31407

Open
OnkelTem wants to merge 1 commit into
anomalyco:devfrom
OnkelTem:feature/file-links
Open

feat(web): file mentions now open files in the editor#31407
OnkelTem wants to merge 1 commit into
anomalyco:devfrom
OnkelTem:feature/file-links

Conversation

@OnkelTem

@OnkelTem OnkelTem commented Jun 8, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #31406

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

paths (e.g., packages/app/README.md) that appear in chat messages are now rendered as clickable links. Clicking a path opens the file in the side panel editor tab.

Changes

packages/ui/src/components/markdown.tsx — added markFileLinks() that scans inline <code> elements (not inside <pre>) for file path patterns (contains ., not an HTTP URL, no invalid path characters <>:"|?*) and wraps them in <a data-file-path="..." class="file-link">. Added setupFileClick handler and onFileClick prop.

packages/ui/src/components/message-part.tsx — passed onFileClick through the component chain to Markdown.

packages/app/src/pages/session.tsx — wired onFileClick to open the tab, load file content, and show the side panel.

How did you verify your code works?

By testing it across my sessions.

Screenshots / recordings

A screencast: https://youtu.be/OBDPo-FNuwo

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@OnkelTem OnkelTem force-pushed the feature/file-links branch 2 times, most recently from 9e32c16 to e2541a3 Compare June 9, 2026 10:52
@OnkelTem OnkelTem force-pushed the feature/file-links branch from e2541a3 to e4e8f56 Compare June 9, 2026 11:56
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.

[FEATURE]: open files in built-in editor in web ui

1 participant