Start out Copilot2;
Add hidden_action_types to CommandPaletteFilter. WindowContext.available_actions now returns global actions as well. Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
co-authored by
Antonio
parent
001ce47a0c
commit
b73ccc8180
@@ -1486,10 +1486,18 @@ impl<'a> WindowContext<'a> {
|
||||
|
||||
pub fn available_actions(&self) -> Vec<Box<dyn Action>> {
|
||||
if let Some(focus_id) = self.window.focus {
|
||||
self.window
|
||||
let mut actions = self
|
||||
.window
|
||||
.current_frame
|
||||
.dispatch_tree
|
||||
.available_actions(focus_id)
|
||||
.available_actions(focus_id);
|
||||
actions.extend(
|
||||
self.app
|
||||
.global_action_listeners
|
||||
.keys()
|
||||
.filter_map(|type_id| self.app.actions.build_action_type(type_id).ok()),
|
||||
);
|
||||
actions
|
||||
} else {
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user