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
d04ac864b8Cole Miller committed on 10/7/2025, 4:48:37 PM· committed by GitHubparentf9a2724
3 files changedLine totals unavailable