# agent_ui: Fix send failure for pasted file\#line mention links \(\#49786\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a3a28eac0ac463721f4828bcbe3d74c6f3508c3d

Requested commit: a3a28eac0ac463721f4828bcbe3d74c6f3508c3d

Commit: a3a28eac0ac463721f4828bcbe3d74c6f3508c3d

Tree: c6bbe685942cf81422122afb9aed6f247becba5a

Author: Xiaobo Liu

Committer: GitHub

## Message

```
agent_ui: Fix send failure for pasted file#line mention links (#49786)

Release Notes:

- Fixed send failure for pasted file#line mention links


Handle `MentionUri::Selection` with a file path in
`confirm_mention_for_uri`
by resolving it to text content via existing line-range loading logic,
instead
of returning "Unsupported mention URI type for paste".

Keep untitled-buffer selections (`abs_path: None`) as an explicit
unsupported
error for now.

Add a regression test for pasting selection mentions to ensure they
resolve to
`Mention::Text` with the expected line range.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
```

## Parents

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

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