# Add slash commands for adding context into the assistant \(\#12102\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a73a3ef2437e49c90fa96ee0dd16dc9de9c97f68

Requested commit: a73a3ef2437e49c90fa96ee0dd16dc9de9c97f68

Commit: a73a3ef2437e49c90fa96ee0dd16dc9de9c97f68

Tree: 4d7e96949db05a3a8b71a4ac7f75cf64d14b2f38

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Add slash commands for adding context into the assistant (#12102)

Tasks

* [x] remove old flaps and output when editing a slash command
* [x] the completing a command name that takes args, insert a space to
prepare for typing an arg
* [x] always trigger completions when  typing in a slash command
* [x] don't show line numbers
* [x] implement `prompt` command
* [x] `current-file` command
* [x] state gets corrupted on `duplicate line up` on a slash command
* [x] exclude slash command source from completion request

Next steps:
* show output token count in flap trailer
* add `/project` command that matches project ambient context
* delete ambient context

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
```

## Parents

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

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