Fix hiding editor toolbar and add agent_review
setting (#29854)
Closes #29836 The agent diff toolbar item was causing the editor toolbar to show even when all the other elements were disabled via settings. This PR fixes this by setting the location to `ToolbarItemLocation::Hidden` in the states where it shouldn't show. It also adds a new a `toolbar.agent_review` setting to hide the agent review buttons altogether. However, if the other toolbar elements are hidden and the file isn't under review, the editor toolbar will still be hidden. So you only need to set this to `false` if you don't want them to show up even under agent review. Release Notes: - N/A
This commit is contained in:
parent
1fc57ea9f5
commit
9c11d24887
6 changed files with 159 additions and 53 deletions
|
@ -101,6 +101,7 @@ pub struct Toolbar {
|
|||
pub breadcrumbs: bool,
|
||||
pub quick_actions: bool,
|
||||
pub selections_menu: bool,
|
||||
pub agent_review: bool,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
|
@ -400,11 +401,15 @@ pub struct ToolbarContent {
|
|||
///
|
||||
/// Default: true
|
||||
pub quick_actions: Option<bool>,
|
||||
|
||||
/// Whether to show the selections menu in the editor toolbar
|
||||
/// Whether to show the selections menu in the editor toolbar.
|
||||
///
|
||||
/// Default: true
|
||||
pub selections_menu: Option<bool>,
|
||||
/// Whether to display Agent review buttons in the editor toolbar.
|
||||
/// Only applicable while reviewing a file edited by the Agent.
|
||||
///
|
||||
/// Default: true
|
||||
pub agent_review: Option<bool>,
|
||||
}
|
||||
|
||||
/// Scrollbar related settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue