# Don't construct an agent panel when \`disable_ai\` is set \(\#39689\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d04ac864b8cb78ee888ce03323e34c17a6dd16b9

Requested commit: d04ac864b8cb78ee888ce03323e34c17a6dd16b9

Commit: d04ac864b8cb78ee888ce03323e34c17a6dd16b9

Tree: 5498a416531e872cea579115a928a3a2ff303d35

Author: Cole Miller

Committer: GitHub

## Message

```
Don't construct an agent panel when `disable_ai` is set (#39689)

Follow-up to #39649, possible fix for #39669

This implements an alternate strategy for showing/hiding the agent panel
in response to `disable_ai`. We don't load the panel at all if AI is
disabled at startup, and when the value of `disable_ai` changes, we load
the panel or destroy it as needed.

Release Notes:

- N/A
```

## Parents

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

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