feat(palette): unify quick open into command palette with multi-source search
Merge file picker into command palette. Single Cmd+P entry searches files, sessions, settings pages and commands; groups re-order by best fuzzy score per source. Sessions show branch labels; git status is lazily fetched for all session directories on open. Drop QuickOpenDialog and Cmd+K shortcut.
This commit is contained in:
@@ -115,7 +115,6 @@ const MENU_ITEM_SETTINGS_ID: &str = "menu_settings";
|
||||
#[cfg(target_os = "macos")]
|
||||
const MENU_ITEM_COMMAND_PALETTE_ID: &str = "menu_command_palette";
|
||||
#[cfg(target_os = "macos")]
|
||||
const MENU_ITEM_QUICK_OPEN_ID: &str = "menu_quick_open";
|
||||
#[cfg(target_os = "macos")]
|
||||
const MENU_ITEM_NEW_SESSION_ID: &str = "menu_new_session";
|
||||
#[cfg(target_os = "macos")]
|
||||
@@ -394,14 +393,6 @@ fn build_macos_menu<R: tauri::Runtime>(
|
||||
MENU_ITEM_COMMAND_PALETTE_ID,
|
||||
"Command Palette",
|
||||
true,
|
||||
Some("Cmd+K"),
|
||||
)?;
|
||||
|
||||
let quick_open = MenuItem::with_id(
|
||||
app,
|
||||
MENU_ITEM_QUICK_OPEN_ID,
|
||||
"Quick Open…",
|
||||
true,
|
||||
Some("Cmd+P"),
|
||||
)?;
|
||||
|
||||
@@ -592,7 +583,6 @@ fn build_macos_menu<R: tauri::Runtime>(
|
||||
&PredefinedMenuItem::separator(app)?,
|
||||
&settings,
|
||||
&command_palette,
|
||||
&quick_open,
|
||||
&PredefinedMenuItem::separator(app)?,
|
||||
&PredefinedMenuItem::services(app, None)?,
|
||||
&PredefinedMenuItem::separator(app)?,
|
||||
@@ -3885,11 +3875,6 @@ fn main() {
|
||||
dispatch_menu_action(app, "command-palette");
|
||||
return;
|
||||
}
|
||||
if id == MENU_ITEM_QUICK_OPEN_ID {
|
||||
dispatch_menu_action(app, "quick-open");
|
||||
return;
|
||||
}
|
||||
|
||||
if id == MENU_ITEM_NEW_SESSION_ID {
|
||||
dispatch_menu_action(app, "new-session");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user