mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 09:01:49 +00:00
feat: use keybindings in all selectors and lists
Update all selector/list components to use EditorKeybindingsManager: - model-selector, session-selector, oauth-selector, user-message-selector - hook-selector, hook-input, hook-editor, tree-selector - select-list, settings-list, cancellable-loader This allows users to configure selectUp, selectDown, selectConfirm, selectCancel actions in keybindings.json
This commit is contained in:
parent
8f2682578b
commit
7574fed2f2
11 changed files with 73 additions and 64 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { matchesKey } from "../keys.js";
|
||||
import { getEditorKeybindings } from "../keybindings.js";
|
||||
import { Loader } from "./loader.js";
|
||||
|
||||
/**
|
||||
|
|
@ -27,7 +27,8 @@ export class CancellableLoader extends Loader {
|
|||
}
|
||||
|
||||
handleInput(data: string): void {
|
||||
if (matchesKey(data, "escape")) {
|
||||
const kb = getEditorKeybindings();
|
||||
if (kb.matches(data, "selectCancel")) {
|
||||
this.abortController.abort();
|
||||
this.onAbort?.();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue