Skip to content

feat: add clickable markdown file references#18836

Open
stenci wants to merge 1 commit intoanomalyco:devfrom
stenci:deeplinks
Open

feat: add clickable markdown file references#18836
stenci wants to merge 1 commit intoanomalyco:devfrom
stenci:deeplinks

Conversation

@stenci
Copy link
Copy Markdown

@stenci stenci commented Mar 23, 2026

Issue for this PR

Closes #13430

Type of change

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

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:

  • unique paths open immediately
  • ambiguous filename-only references show a file picker
  • file:line highlights the target line
  • file:start-end highlights the full range
  • external file paths open correctly

Screenshots / recordings

Attached a video showing the behaviors above.
https://github.com/user-attachments/assets/05be6ba1-04ae-4790-ad50-268928a5fbfd

Checklist

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

@stenci stenci requested a review from adamdotdevin as a code owner March 23, 2026 20:29
@github-actions
Copy link
Copy Markdown
Contributor

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.

@stenci
Copy link
Copy Markdown
Author

stenci commented Mar 23, 2026

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.

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]:[Web]: Clickable file:line references in messages (jump to file and line)

1 participant