Ensure disable_ai
is properly respected (#34941)
Quick follow up to #34896 which ensures that the Agent Panel cannot be caught by actions like `workspace: toggle left dock` when `disable_ai` is set to true. Also removes a method that was introduced but unused in the workspace because `first_enabled_panel_idx` already covers all cases this method could be useful for. Release Notes: - N/A
This commit is contained in:
parent
c2c2264a60
commit
2bc6e18ac9
2 changed files with 3 additions and 12 deletions
|
@ -374,12 +374,6 @@ impl Dock {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn first_enabled_panel_idx_excluding(&self, exclude_name: &str, cx: &App) -> Option<usize> {
|
||||
self.panel_entries.iter().position(|entry| {
|
||||
entry.panel.persistent_name() != exclude_name && entry.panel.enabled(cx)
|
||||
})
|
||||
}
|
||||
|
||||
fn active_panel_entry(&self) -> Option<&PanelEntry> {
|
||||
self.active_panel_index
|
||||
.and_then(|index| self.panel_entries.get(index))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue