mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-19 10:29:35 +03:00
Hide Inline Assist button if assistant.button is disabled (#7932)
This PR adds check for `assistant.button` setting in quick bar, to hide it when the setting is set to false. It seems that the setting can be a separate one, I would be happy to add it if needed. Release Notes: - Improved `assistant.button` setting so that `Inline Assist` button in editor quick bar is also hidden ([#4500](https://github.com/zed-industries/zed/issues/4500)).
This commit is contained in:
parent
6d9b8cc595
commit
a041e07c99
@ -1,5 +1,5 @@
|
||||
pub mod assistant_panel;
|
||||
mod assistant_settings;
|
||||
pub mod assistant_settings;
|
||||
mod codegen;
|
||||
mod prompts;
|
||||
mod streaming_diff;
|
||||
|
@ -1,3 +1,4 @@
|
||||
use assistant::assistant_settings::AssistantSettings;
|
||||
use assistant::{AssistantPanel, InlineAssist};
|
||||
use editor::{Editor, EditorSettings};
|
||||
|
||||
@ -126,7 +127,9 @@ impl Render for QuickActionBar {
|
||||
.gap_2()
|
||||
.children(inlay_hints_button)
|
||||
.children(search_button)
|
||||
.child(assistant_button)
|
||||
.when(AssistantSettings::get_global(cx).button, |bar| {
|
||||
bar.child(assistant_button)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user