feat: add clickable markdown file references#18836
feat: add clickable markdown file references#18836stenci wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
Why it might be related: PR #15269 appears to address a very similar feature - making file references clickable in the session UI. Both PRs are focused on enabling clickable file references in markdown messages. This could be an earlier attempt at the same feature or an incomplete implementation that the current PR (18836) is improving upon. |
|
This definitely overlaps with #15269, but this PR is intentionally narrower and aimed specifically at #13430. It focuses on clickable file refs that show up in markdown in the session UI, including assistant messages and markdown-rendered tool outputs. It also handles direct opens, ambiguous matches with a picker, line/range highlighting, and external paths. From what I can tell, #15269 also goes further into custom tool-card file links and broader desktop/open-path plumbing. I kept this one smaller and more focused so it’s closer to the web UI issue and easier to review. |
Issue for this PR
Closes #13430
Type of change
What does this PR do?
Makes file references in markdown messages clickable in the session view.
When a reference matches a single file, it opens that file directly. When it matches multiple files, it shows a picker. References with line numbers or ranges also highlight the target lines, and external file paths are supported too.
I’ve been using this locally for the past few weeks and found it to be a real time-saver when jumping from chat output to the referenced changes with a single click.
How did you verify your code works?
Tested locally by clicking file references in assistant messages and confirming that:
file:linehighlights the target linefile:start-endhighlights the full rangeScreenshots / recordings
Attached a video showing the behaviors above.
https://github.com/user-attachments/assets/05be6ba1-04ae-4790-ad50-268928a5fbfd
Checklist