# Add option for code context menu items to have dynamic width \(\#37404\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 946efb03df74a90dcaa15b2838820fda9d7e1daf

Requested commit: 946efb03df74a90dcaa15b2838820fda9d7e1daf

Commit: 946efb03df74a90dcaa15b2838820fda9d7e1daf

Tree: 9686be6fd6d5ad4a969c7c0b55e3d0b6b85bfb5c

Author: Danilo Leal

Committer: GitHub

## Message

```
Add option for code context menu items to have dynamic width (#37404)

Follow up to https://github.com/zed-industries/zed/pull/30598

This PR introduces the `display_options` field in the
`CompletionResponse`, allowing a code context menu width to be
dynamically dictated based on its larger item. This will allow us to
have the @-mentions and slash commands completion menus in the agent
panel not be bigger than it needs to be. It may also be relevant/useful
in the future for other use cases.

For now, we set all instances of code context menus to use a fixed
width, as defined in the PR linked above, which means this PR shouldn't
cause any visual change.

Release Notes:

- N/A

Co-authored-by: Michael Sloan <mgsloan+github@gmail.com>
```

## Parents

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

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