Repository navigation
Conversation
e2541a3 to
e4e8f56
Compare
e4e8f56 to
bc1762e
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
|
Bumping — this was auto-closed by the cleanup bot on age/reaction count, not on its merits, and the capability is still absent. It's repeatedly requested and still open: #13430 (web, incl. file:line), #31406 (what this PR closes), #17209 / #37891 (desktop), #17478. File paths shown in chat are still plain, non-clickable text. One thing worth flagging for whoever rebases: the code has moved since June. The message renderer now lives in Happy to see this land; a rebased PR against current |
Issue for this PR
Closes #31406
Type of change
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— addedmarkFileLinks()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">. AddedsetupFileClickhandler andonFileClickprop.packages/ui/src/components/message-part.tsx— passedonFileClickthrough the component chain toMarkdown.packages/app/src/pages/session.tsx— wiredonFileClickto 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