# agent_ui: Fix slash characters being intercepted as commands \(\#56862\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 23584b825cccb032108798cdca9f9d4e09420507

Requested commit: 23584b825cccb032108798cdca9f9d4e09420507

Commit: 23584b825cccb032108798cdca9f9d4e09420507

Tree: 2a527f41e8017259355784e6c13326dab53facba

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_ui: Fix slash characters being intercepted as commands (#56862)

Follow up to https://github.com/zed-industries/zed/pull/56689. This PR
fixes an error where any instance of a slash character in the message
editor was going through the slash command validation. The fix makes the
validation get triggered only if the slash character is the very first
thing typed in the message. This follow the approach Slack, Discord, and
other apps that contain slash commands use. Also tweaked the messaging a
little bit so it's crystal clear what's happening.

Release Notes:

- N/A
```

## Parents

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

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