zed icon indicating copy to clipboard operation
zed copied to clipboard

Make mentions of project files clickable

Open pcholakov opened this issue 1 year ago • 5 comments

When Claude makes plans, it mentions file locations within the project, e.g.:

Files to modify:

  1. lib/core.ts:94 - Change foo from X to Y

It would be great if these locations were clickable links that opened the relevant file (and line or symbol) in the Zed editor.

pcholakov avatar Sep 04 '25 06:09 pcholakov

Yes, please!! Links for project files generated in agent panel thrown an error when clicked: The application cannot be opened.

stefanosandes avatar Nov 27 '25 14:11 stefanosandes

[@filename](file:///absolute/path/to/filename#L42) works for me

deadnews avatar Mar 15 '26 19:03 deadnews

Sure, but the LLMs often just write relative/path/to/filename instead. I agree that they should be rendered clickable. Thanks

willlma avatar May 22 '26 22:05 willlma

My Codex integration had the problem of broken links as well, and I fixed it by adding this instruction to AGENTS.md (they render not as chips but in default HTML link style, but at least they aren't broken anymore).:

<ZED AGENT ONLY>: If you mention a file in your response, use [%filename%.%extension%](file://%filepath%.%extension%) syntax to create a link to it, where it makes sense.
If you mention a symbol (function, variable etc.), use this format: [%symbol_name%](file://%filepath%.%extension%#L%line_number%)

Beat them with their weapon, as they say

rubin-alldev avatar May 25 '26 18:05 rubin-alldev

A simpler option for workspace files: #57303 added clickable backticked paths, such as src/main.rs or src/main.rs:42. The code is already in Zed 1.30.2, including the Claude ACP view.

The file must be indexed in the workspace; paths in fenced code blocks stay plain. Explicit file links remain a fallback. I checked the code, but haven’t tested clicking these on Windows.

Could we mention this existing support here and clarify what’s still missing?

Seithx avatar Dec 01 '26 13:12 Seithx