# agent: Improve \`AddSelectionToThread\` action display \(\#42280\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 12857a7207dd8d5895a6b55945fe9c4c044d171f

Requested commit: 12857a7207dd8d5895a6b55945fe9c4c044d171f

Commit: 12857a7207dd8d5895a6b55945fe9c4c044d171f

Tree: 0e4ba6d819e4e8f9e308717e551a99cd6ad33360

Author: Danilo Leal

Committer: GitHub

## Message

```
agent: Improve `AddSelectionToThread` action display (#42280)

Closes https://github.com/zed-industries/zed/issues/42276

This fixes the fact that the `AddSelectionToThread` action was visible
when `disable_ai` was true, as well as it improves its display by making
it either disabled or hidden when there are no selections in the editor.
I also ended up removing it from the app menu simply because making it
observe the `disable_ai` setting would be a bit more complex than I'd
like at the moment, so figured that, given I'm also now adding it to the
toolbar selection menu, we could do without it over there.

Release Notes:

- Fixed the `AddSelectionToThread` action showing up when `disable_ai`
is true
- Improved the `AddSelectionToThread` action display by only making it
available when there are selections in the editor
```

## Parents

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

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