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:
Piotr Osiewicz
2023-12-05 14:57:20 +01:00
co-authored by Antonio
parent 001ce47a0c
commit b73ccc8180
8 changed files with 388 additions and 357 deletions
+10 -2
View File
@@ -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()
}