[FEATURE]: Clickable file paths in agent responses #8120

Closed
opened 2026-02-16 18:09:12 -05:00 by yindo · 1 comment
Owner

Originally created by @chenditc on GitHub (Jan 31, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

When an agent responds with file paths in its text (e.g., mentioning src/components/Button.tsx or /path/to/file.ts), users currently cannot click on these paths to quickly open the file in the review panel. This requires users to manually:

  1. Copy the file path from the response
  2. Use the "Open file" command (Cmd+P)
  3. Paste and search for the file
  4. Select and open it

This creates unnecessary friction, especially when the agent mentions multiple files or when navigating through code explanations.

Proposed Solution

Make inline code elements in agent markdown responses clickable when they look like file paths. Clicking should:

  1. Open the file in a new tab in the review panel
  2. Focus the newly opened tab
  3. Load and display the file content

Expected Behavior

When an agent responds with text like:

The main rendering logic is in packages/ui/src/components/markdown.tsx and the styles are in packages/ui/src/components/markdown.css.

Users should be able to:

  • See a pointer cursor when hovering over the file paths
  • See an underline effect on hover for visual feedback
  • Click to immediately open the file in the review panel

Supported Path Formats

  • Relative paths: src/components/Button.tsx
  • Dot-relative paths: ./src/foo.ts, ../bar.js
  • Absolute paths: /home/user/project/file.ts

Use Cases

  1. Code review: Agent explains changes across multiple files - click to navigate between them
  2. Debugging: Agent identifies problematic files - click to inspect immediately
  3. Learning codebase: Agent describes architecture - click to explore referenced files
  4. Refactoring: Agent suggests files to modify - click to open and edit
Originally created by @chenditc on GitHub (Jan 31, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ## Problem When an agent responds with file paths in its text (e.g., mentioning `src/components/Button.tsx` or `/path/to/file.ts`), users currently cannot click on these paths to quickly open the file in the review panel. This requires users to manually: 1. Copy the file path from the response 2. Use the "Open file" command (Cmd+P) 3. Paste and search for the file 4. Select and open it This creates unnecessary friction, especially when the agent mentions multiple files or when navigating through code explanations. ## Proposed Solution Make inline code elements in agent markdown responses clickable when they look like file paths. Clicking should: 1. Open the file in a new tab in the review panel 2. Focus the newly opened tab 3. Load and display the file content ## Expected Behavior When an agent responds with text like: > The main rendering logic is in `packages/ui/src/components/markdown.tsx` and the styles are in `packages/ui/src/components/markdown.css`. Users should be able to: - See a pointer cursor when hovering over the file paths - See an underline effect on hover for visual feedback - Click to immediately open the file in the review panel ## Supported Path Formats - Relative paths: `src/components/Button.tsx` - Dot-relative paths: `./src/foo.ts`, `../bar.js` - Absolute paths: `/home/user/project/file.ts` ## Use Cases 1. **Code review**: Agent explains changes across multiple files - click to navigate between them 2. **Debugging**: Agent identifies problematic files - click to inspect immediately 3. **Learning codebase**: Agent describes architecture - click to explore referenced files 4. **Refactoring**: Agent suggests files to modify - click to open and edit
yindo added the discussionweb labels 2026-02-16 18:09:12 -05:00
yindo closed this issue 2026-02-16 18:09:12 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 31, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5274: File paths in assistant responses are not clickable in Zed editor

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 31, 2026): This issue might be a duplicate of existing issues. Please check: - #5274: File paths in assistant responses are not clickable in Zed editor Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8120