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:
aos 2026-01-25 14:08:11 -05:00 committed by GitHub
parent 4bb21b7f5f
commit 225fcb3830
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 27 additions and 10 deletions

View file

@ -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",
};
/**