# agent_ui: Preserve selection mentions when starting a new thread \(\#55203\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9a125a553dd2e031c1a7fd76091147e70aa89211

Requested commit: 9a125a553dd2e031c1a7fd76091147e70aa89211

Commit: 9a125a553dd2e031c1a7fd76091147e70aa89211

Tree: 127d6ca010fb00677cc0e58f88f0718957051409

Author: Neel

Committer: GitHub

## Message

```
agent_ui: Preserve selection mentions when starting a new thread (#55203)

When the "+" button created a fresh draft, `active_initial_content`
fell back to the raw editor text when the async `draft_prompt`
observer had not yet resolved. That raw text contains fold placeholder
strings (e.g. "selection") rather than the mention links, so creases
and their registered URIs were dropped from the carried-over draft.

Related to https://github.com/zed-industries/zed/issues/53981.

Release Notes:

- Fixed a bug where selection mentions would resolve to the literal
`selection` rather than the URI in draft threads.
```

## Parents

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

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