Skip to content

acp_thread: Support absolute file mentions with row fragments - #53229

Merged
benbrandt merged 4 commits into
zed-industries:mainfrom
Revantark:fix-absolute-mention-paths
May 3, 2026
Merged

acp_thread: Support absolute file mentions with row fragments#53229
benbrandt merged 4 commits into
zed-industries:mainfrom
Revantark:fix-absolute-mention-paths

Conversation

@Revantark

@Revantark Revantark commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Sometimes the contents in the agent's thread are direct file links. Codex ACP almost every time uses absolute file paths instead of file://path/to/file. This is resulting in an error described in the #49978 .

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #49978

Release Notes:

  • Fixed absolute path mentions in acp_thread so direct file references (including :line and #Lline formats) now open correctly instead of resolving to invalid/empty files.

@cla-bot

cla-bot Bot commented Apr 6, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @Revantark on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Apr 6, 2026
@zed-codeowner-coordinator
zed-codeowner-coordinator Bot requested review from a team, bennetbo and maxbrunsfeld and removed request for a team April 6, 2026 11:23
@Revantark

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 6, 2026
@cla-bot

cla-bot Bot commented Apr 6, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@Revantark Revantark closed this Apr 6, 2026
@Revantark Revantark reopened this Apr 6, 2026
@ChristopherBiscardi ChristopherBiscardi added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Apr 7, 2026
@alpharder

Copy link
Copy Markdown

Will this also correctly recognize paths surrounded by backticks?
e.g. packages/backend/src/rpc/routers/audit.ts

@Revantark

Copy link
Copy Markdown
Contributor Author

Will this also correctly recognize paths surrounded by backticks? e.g. packages/backend/src/rpc/routers/audit.ts

I missed this case. It doesn't handle it right now. I will push a fix. Thanks

@Revantark

Copy link
Copy Markdown
Contributor Author

@alpharder pushed a fix.

@Revantark

Copy link
Copy Markdown
Contributor Author

@eholk I have updated the tests to include windows parsing.

Merged via the queue into zed-industries:main with commit 6dd03c9 May 3, 2026
31 checks passed
@jrmajor

jrmajor commented May 4, 2026

Copy link
Copy Markdown

Thank you!

ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
…dustries#53229)

Sometimes the contents in the agent's thread are direct file links.
Codex ACP almost every time uses absolute file paths instead of
file://path/to/file. This is resulting in an error described in the
zed-industries#49978 .


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes zed-industries#49978

Release Notes:

- Fixed absolute path mentions in `acp_thread` so direct file references
(including `:line` and `#Lline` formats) now open correctly instead of
resolving to invalid/empty files.

---------

Co-authored-by: Eric Holk <eric@zed.dev>
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…dustries#53229)

Sometimes the contents in the agent's thread are direct file links.
Codex ACP almost every time uses absolute file paths instead of
file://path/to/file. This is resulting in an error described in the
zed-industries#49978 .


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes zed-industries#49978

Release Notes:

- Fixed absolute path mentions in `acp_thread` so direct file references
(including `:line` and `#Lline` formats) now open correctly instead of
resolving to invalid/empty files.

---------

Co-authored-by: Eric Holk <eric@zed.dev>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…dustries#53229)

Sometimes the contents in the agent's thread are direct file links.
Codex ACP almost every time uses absolute file paths instead of
file://path/to/file. This is resulting in an error described in the
zed-industries#49978 .


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes zed-industries#49978

Release Notes:

- Fixed absolute path mentions in `acp_thread` so direct file references
(including `:line` and `#Lline` formats) now open correctly instead of
resolving to invalid/empty files.

---------

Co-authored-by: Eric Holk <eric@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Response in Agent panel for filename hyperlink results in error instead of file open

9 participants