Add command-mode floating switcher overlay
Whenever the command query starts with the existing '>' prefix the shell now overlays a 640-wide floating panel — backdrop dim, glass card, three ranked sections (Open tabs from snapshot.tabs, History from snapshot.history_entries, and a fixed action set for workspace + key internal routes), and a footer with the design's keyboard hints. Each result is a real navigation hop; selecting a row dispatches the appropriate shell action and clears the command query so the overlay dismisses without leaving stale chrome state. The overlay reads from the live BrowserSnapshot rather than fabricating results, and matches case-insensitively against title and URL. Empty queries surface the most recent items so the panel stays useful even before the user types.
This commit is contained in:
@@ -7,8 +7,8 @@ use gpui::{
|
||||
};
|
||||
|
||||
use super::chrome::{
|
||||
PANEL_BG, WallpaperTheme, panel_shadow, render_topbar as render_topbar_chrome,
|
||||
render_wallpaper,
|
||||
PANEL_BG, WallpaperTheme, panel_shadow, render_command_overlay,
|
||||
render_topbar as render_topbar_chrome, render_wallpaper,
|
||||
};
|
||||
use super::sidebar::collapsed_sidebar_active;
|
||||
use super::{ElyShell, ShellState};
|
||||
@@ -75,6 +75,7 @@ impl ElyShell {
|
||||
.child(self.render_sidebar(&snapshot, sidebar_width, sidebar_collapsed, cx))
|
||||
.child(self.render_main_pane(&snapshot, &active_tab, sidebar_collapsed, cx)),
|
||||
)
|
||||
.children(render_command_overlay(&snapshot, cx))
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user