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:53:01 +01:00
parent 001ce47a0c
commit b73ccc8180
8 changed files with 388 additions and 357 deletions

View file

@ -109,7 +109,7 @@ impl PickerDelegate for CommandPaletteDelegate {
let filtered = cx.read(|cx| {
if cx.has_global::<CommandPaletteFilter>() {
let filter = cx.global::<CommandPaletteFilter>();
filter.filtered_namespaces.contains(action.namespace())
filter.hidden_namespaces.contains(action.namespace())
} else {
false
}
@ -430,7 +430,7 @@ mod tests {
// Add namespace filter, and redeploy the palette
cx.update(|cx| {
cx.update_default_global::<CommandPaletteFilter, _, _>(|filter, _| {
filter.filtered_namespaces.insert("editor");
filter.hidden_namespaces.insert("editor");
})
});