# agent_ui: Fix label for image mentions \(\#52995\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7e271711749cad0e1092c125d5f16bd22738bec6)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7e271711749cad0e1092c125d5f16bd22738bec6

Requested commit: 7e271711749cad0e1092c125d5f16bd22738bec6

Commit: 7e271711749cad0e1092c125d5f16bd22738bec6

Tree: 90ec24f632def4e12600c6b6f6118c19eeee9b0e

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_ui: Fix label for image mentions (#52995)

This PR fixes an issue where an image mention would have its label reset
to just "Image", instead of persisting the original label, when the
prompt got submitted.

Closes #48564

Release Notes:

- agent: Fixed image mention labels by persisting the file name after
submitting the prompt
- agent: Fixed directory mentions being incorrectly parsed as files when
pasting into prompt editor

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
```

## Parents

- [d0a61a42d9ffb606fbe4eea004afa23b2f9a1b0d](https://git.cafe/gitcafe/zed/commit/d0a61a42d9ffb606fbe4eea004afa23b2f9a1b0d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7e271711749cad0e1092c125d5f16bd22738bec6?format=markdown)
