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
2 changed files with 5 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue