feat(shortcuts): rework shortcut bindings, focus restore, and input guards

Resolve effective bindings from stored prefs plus defaults with leader/direct collision handling and default leader Ctrl+X; let direct actions pass through in terminals and suppress abort while an overlay is open. Add half-page scroll disengage, verified overlay focus restore, and consolidate prompt reset.
This commit is contained in:
Chris Scott committed 2026-10-08 12:40:04 -04:00
1 parent 7e8443f54f
commit 994a8b82e8
33 files changed
+784 -195

No files matched your search

+1 -4
View File
@@ -1,3 +1,4 @@
import { isRecord } from '@opencode-manager/shared/utils'
import type { KeyboardShortcutAction } from '@/api/types/settings'
import { parseJsonc } from '@/lib/jsonc'
import { normalizeShortcut } from '@/lib/keyboardShortcuts'
@@ -104,10 +105,6 @@ const KEY_LABELS = new Map<string, string>([
['insert', 'Insert'],
])
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === 'object' && value !== null && !Array.isArray(value)
}
function isKeyStroke(value: unknown): value is KeyStroke {
return isRecord(value) && typeof value.name === 'string'
}