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

Open
opened 2026-02-16 18:18:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11429

State: open
Merged: No


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

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11429 **State:** open **Merged:** No --- ### 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
yindo added the pull-request label 2026-02-16 18:18:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13785