Skip to content

agent: Add parent to mention file/directory when available#50097

Closed
jmg-duarte wants to merge 9 commits into
zed-industries:mainfrom
jmg-duarte:jmgd/extended-file-name
Closed

agent: Add parent to mention file/directory when available#50097
jmg-duarte wants to merge 9 commits into
zed-industries:mainfrom
jmg-duarte:jmgd/extended-file-name

Conversation

@jmg-duarte

@jmg-duarte jmg-duarte commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

When mentioning files with the same name (mod.rs, index.ts, etc) it gets really confusing. This PR aims to mitigate that by showing the first parent.

Dark Mode
Screenshot 2026-02-25 at 15 39 13
Light Mode
Screenshot 2026-02-25 at 15 39 26

Release Notes:

  • Agent: Disambiguated mentioned files with the same name by displaying their parent folder's name in the mention chip.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Feb 25, 2026
@jmg-duarte jmg-duarte changed the title Add parent to mention file/directory when available agent: Add parent to mention file/directory when available Mar 1, 2026

@danilo-leal danilo-leal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR! I think we should follow the tabs pattern here: only display the parent folder's name if there are mentions with the same file name, instead of all the time.

Comment thread crates/agent_ui/src/mention_set.rs Outdated
@jmg-duarte jmg-duarte requested a review from danilo-leal March 2, 2026 16:08
@SomeoneToIgnore SomeoneToIgnore added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Mar 2, 2026
@extrawurst

Copy link
Copy Markdown

@danilo-leal would be great to move this forward. what does it take to get it merged?

@bennetbo

bennetbo commented May 21, 2026

Copy link
Copy Markdown
Member

Thanks for working on this. This was fixed on main by another PR:
image

@bennetbo bennetbo closed this May 21, 2026
@jmg-duarte jmg-duarte deleted the jmgd/extended-file-name branch May 21, 2026 09:34
@jmg-duarte

Copy link
Copy Markdown
Contributor Author

@bennetbo could you at least link the PR? It's the least you guys could do after scoping my PR down, having me fixing it and then ignoring me for months...

@bennetbo

Copy link
Copy Markdown
Member

Hey, sorry for the oversight, this was not intentional. We get a lot of PRs and sometimes we lose track of which ones are stale and which ones are not. We implemented it here #56926. I'll make sure to link to this PR when this lands on Stable next week

@JosephTLyons

Copy link
Copy Markdown
Collaborator

I've included a link to this PR in today's stable release.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants