# Fix inline assist panic \(\#43364\) · gitcafe/zed

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

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

Visibility: public

Requested revision: da143c55274ea7f8fda1f43c2a82461bb27003e1

Requested commit: da143c55274ea7f8fda1f43c2a82461bb27003e1

Commit: da143c55274ea7f8fda1f43c2a82461bb27003e1

Tree: 018a39d1edd4d9a5aaad4e282d9a94c822fd65d1

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
Fix inline assist panic (#43364)

Fixes a panic that was introduced in #42633. Repro steps:
1. Open the inline assistant and mention a file in the prompt
2. Run the inline assistant
3. Remove the mention and insert a different one
4. 💥

This would happen because the mention set still had a reference to the
old editor, because we create a new one in `PromptEditor::unlink`.

Also removes the unused
`crates/agent_ui/src/context_picker/completion_provider.rs` file, which
was not removed by mistake in the previous PR.

Release Notes:

- N/A
```

## Parents

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

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