# assistant: Improve \`/docs\` argument completions \(\#13876\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 68accaeb00be484448b0e6e55a65a0a860ce9a00

Requested commit: 68accaeb00be484448b0e6e55a65a0a860ce9a00

Commit: 68accaeb00be484448b0e6e55a65a0a860ce9a00

Tree: 3b28aa0ba06717a80e6647b2c96de415d8311638

Author: Marshall Bowers

Committer: GitHub

## Message

```
assistant: Improve `/docs` argument completions (#13876)

This PR improves the completions for arguments in the `/docs` slash
command.

We achieved this by extending the `complete_argument` method on the
`SlashCommand` trait to return a `Vec<ArgumentCompletion>` instead of a
`Vec<String>`.

In addition to the completion `label`, `ArgumentCompletion` has two new
fields that are can be used to customize the completion behavior:

- `new_text`: The actual text that will be inserted when the completion
is accepted, which may be different from what is shown by the completion
label.
- `run_command`: Whether the command is run when the completion is
accepted. This can be set to `false` to allow accepting a completion
without running the command.

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
```

## Parents

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

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