Disable inline assist button when assistant is disabled (#13290)

Release Notes:

- Hide inline assist button when assistant is disabled
([#13289](https://github.com/zed-industries/zed/issues/13289)).
This commit is contained in:
Chung Wei Leong 2024-06-20 17:56:09 +08:00 committed by GitHub
parent 95b06097ee
commit d8c93e1bfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -282,9 +282,11 @@ impl Render for QuickActionBar {
.gap_1p5()
.children(search_button)
.children(editor_selections_dropdown)
.when(AssistantSettings::get_global(cx).button, |bar| {
bar.child(assistant_button)
}),
.when(
AssistantSettings::get_global(cx).enabled
&& AssistantSettings::get_global(cx).button,
|bar| bar.child(assistant_button),
),
)
.child(editor_settings_dropdown)
.when_some(