mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 07:02:04 +00:00
feat: add type-safe KeyId for matchesKey function
- Add KeyId union type covering all valid key combinations
- Add Key helper object for autocomplete (Key.ctrl('c'), Key.escape, etc.)
- Update matchesKey signature to use KeyId instead of string
- Catches typos like 'esacpe' at compile time
This commit is contained in:
parent
f79256ac3b
commit
38b7f21e01
3 changed files with 123 additions and 9 deletions
|
|
@ -27,11 +27,10 @@ export {
|
|||
type EditorKeybindingsConfig,
|
||||
EditorKeybindingsManager,
|
||||
getEditorKeybindings,
|
||||
type KeyId,
|
||||
setEditorKeybindings,
|
||||
} from "./keybindings.js";
|
||||
// Keyboard input handling
|
||||
export { matchesKey, parseKey } from "./keys.js";
|
||||
export { Key, type KeyId, matchesKey, parseKey } from "./keys.js";
|
||||
// Terminal interface and implementations
|
||||
export { ProcessTerminal, type Terminal } from "./terminal.js";
|
||||
// Terminal image support
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue