feat(desktop): broaden hotkey coverage + fold in stray shortcuts
Add rebindable actions for the high-frequency gaps: focus composer, open model picker, next/prev session, search sessions (⌘⇧F), show files/ terminal tab, and nav→artifacts. Reconcile the duplicate Shift+N new- session listener into session.new's defaults, and surface the remaining context-local shortcuts (⌘↵ steer, ⌘L terminal selection, ⌘W close preview) as read-only rows so the panel is the honest source of truth.
This commit is contained in:
@@ -81,6 +81,22 @@ export function toggleFileBrowserOpen() {
|
||||
togglePane(FILE_BROWSER_PANE_ID)
|
||||
}
|
||||
|
||||
export function setFileBrowserOpen(open: boolean) {
|
||||
setPaneOpen(FILE_BROWSER_PANE_ID, open)
|
||||
}
|
||||
|
||||
// Hotkey → focus the sessions search field. Opens the sidebar first, then lets
|
||||
// the field (which only mounts when the sidebar is open) subscribe + focus.
|
||||
export const SESSION_SEARCH_FOCUS_EVENT = 'hermes:focus-session-search'
|
||||
|
||||
export function requestSessionSearchFocus() {
|
||||
setSidebarOpen(true)
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window.setTimeout(() => window.dispatchEvent(new CustomEvent(SESSION_SEARCH_FOCUS_EVENT)), 0)
|
||||
}
|
||||
}
|
||||
|
||||
export function togglePanesFlipped() {
|
||||
$panesFlipped.set(!$panesFlipped.get())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user