# Fix hiding editor toolbar and add \`agent_review\` setting \(\#29854\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9c11d24887a4d001a5fcf46911b269ea3abf93d7

Requested commit: 9c11d24887a4d001a5fcf46911b269ea3abf93d7

Commit: 9c11d24887a4d001a5fcf46911b269ea3abf93d7

Tree: af4016cfdcb71ef887fa17ed2f7c27b650964ced

Author: Agus Zubiaga

Committer: GitHub

## Message

```
Fix hiding editor toolbar and add `agent_review` setting (#29854)

Closes #29836

The agent diff toolbar item was causing the editor toolbar to show even
when all the other elements were disabled via settings.

This PR fixes this by setting the location to
`ToolbarItemLocation::Hidden` in the states where it shouldn't show.

It also adds a new a `toolbar.agent_review` setting to hide the agent
review buttons altogether. However, if the other toolbar elements are
hidden and the file isn't under review, the editor toolbar will still be
hidden. So you only need to set this to `false` if you don't want them
to show up even under agent review.

Release Notes:

- N/A
```

## Parents

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

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