Skip to content

feat: add clickable file paths in agent responses (web UI only)#11429

Open
chenditc wants to merge 2 commits intoanomalyco:devfrom
chenditc:feature/clickable-file-paths
Open

feat: add clickable file paths in agent responses (web UI only)#11429
chenditc wants to merge 2 commits intoanomalyco:devfrom
chenditc:feature/clickable-file-paths

Conversation

@chenditc
Copy link

@chenditc chenditc commented Jan 31, 2026

What does this PR do?

When an agent responds with inline code that looks like a file path (e.g., src/components/Button.tsx), clicking it now opens the file in the review panel.

Supported Path Formats:

  • Relative: src/components/Button.tsx
  • Dot-relative: ./src/foo.ts, ../bar.js
  • Absolute: /data/opencode/packages/ui/src/file.tsx

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

  1. Started backend server: bun run src/index.ts serve --port 4567 in packages/opencode
  2. Started frontend dev server: VITE_OPENCODE_SERVER_PORT=4567 bun run dev in packages/app
  3. Opened web UI at http://localhost:3000
  4. Created a session and asked agent to mention file paths
  5. Verified:
    • Inline code shows pointer cursor on hover
    • Inline code shows underline on hover
    • Clicking a file path opens it in the review panel
    • Newly opened file tab is focused/active
    • File content loads correctly

Fixes #1168

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@chenditc chenditc changed the title feat: add clickable file paths in agent responses feat: add clickable file paths in agent responses (web UI only) Jan 31, 2026
- Enable clicking on file paths in markdown to open them in tabs
- Normalize file paths before opening for consistency
@chenditc chenditc force-pushed the feature/clickable-file-paths branch from 6bc2349 to e968149 Compare January 31, 2026 11:10
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 Request: Make Links Clickable (Ctrl+Left Click to Open)

1 participant