# assistant2: Keep the tool selector open when toggling tools \(\#26994\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 41a2be7e5407c4e85f74a9d89f3dd475092f8ecb

Requested commit: 41a2be7e5407c4e85f74a9d89f3dd475092f8ecb

Commit: 41a2be7e5407c4e85f74a9d89f3dd475092f8ecb

Tree: 42cc9fa64774cd65cb1411e6d71810f769765422

Author: Marshall Bowers

Committer: GitHub

## Message

```
assistant2: Keep the tool selector open when toggling tools (#26994)

This PR makes it so the tool selector will stay open when toggling tools
instead of closing after each selection:


https://github.com/user-attachments/assets/eb987785-cfb5-4b07-8d63-510fbd9d9bf1

This involved making a change to `ContextMenu` to allow it to rebuild
its menu items after each confirmation in order for them to reflect
their selected/unselected status. I intend to clean up the `ContextMenu`
API a bit at a later point, but that is out of scope for this PR.

Release Notes:

- N/A
```

## Parents

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

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