feat: make session selector keybindings configurable (#948)
I lost my ability to select up and down in the session selector because of some hardcoded keybindings again... So, I am adding these configurable keybindings so I can `ctrl+p` to select up :-) ### Changes Adds 4 new keybinding actions for the session picker (/resume): - `toggleSessionPath` (ctrl+p) - toggle path display - `toggleSessionSort` (ctrl+r) - toggle sort mode - `deleteSession` (ctrl+d) - delete selected session - `deleteSessionNoninvasive` (ctrl+backspace) - delete when query empty Refactors session-selector to use `kb.matches()` instead of hardcoded key checks.
This commit is contained in:
@@ -41,7 +41,13 @@ export type EditorAction =
|
||||
// Undo
|
||||
| "undo"
|
||||
// Tool output
|
||||
| "expandTools";
|
||||
| "expandTools"
|
||||
// Session
|
||||
| "toggleSessionPath"
|
||||
| "toggleSessionSort"
|
||||
| "renameSession"
|
||||
| "deleteSession"
|
||||
| "deleteSessionNoninvasive";
|
||||
|
||||
// Re-export KeyId from keys.ts
|
||||
export type { KeyId };
|
||||
@@ -95,6 +101,12 @@ export const DEFAULT_EDITOR_KEYBINDINGS: Required<EditorKeybindingsConfig> = {
|
||||
undo: "ctrl+-",
|
||||
// Tool output
|
||||
expandTools: "ctrl+o",
|
||||
// Session
|
||||
toggleSessionPath: "ctrl+p",
|
||||
toggleSessionSort: "ctrl+s",
|
||||
renameSession: "ctrl+r",
|
||||
deleteSession: "ctrl+d",
|
||||
deleteSessionNoninvasive: "ctrl+backspace",
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user