# agent: Fix mention completion sometimes not dismissing on space \(\#37922\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 630340d6596da6ded5e18bd86868b79263b7ff97

Requested commit: 630340d6596da6ded5e18bd86868b79263b7ff97

Commit: 630340d6596da6ded5e18bd86868b79263b7ff97

Tree: 4fb6fa43b88d87ef8129a514633a00722859f597

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
agent: Fix mention completion sometimes not dismissing on space (#37922)

Previously we would still show a completion menu even when the user
typed an unrecognised mode with an argument,
e.g. `@something word`.
This PR ensures that we only show the completion menu, when the part
after the `@` is a known mode (e.g. `file`/`symbol`/`rule`/...)

Release Notes:

- Fix an issue where completions for `@mentions` in the agent panel
would sometimes not be dismissed when typing a space
```

## Parents

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

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