mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 03:04:28 +00:00
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:
parent
4bb21b7f5f
commit
225fcb3830
3 changed files with 27 additions and 10 deletions
|
|
@ -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",
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue