[refactor] Extract keybinding functionality into @comfyorg/keybinding package

Create framework-agnostic keybinding package following domain-driven design patterns.
Move pure business logic to package while keeping Vue integration in workbench layer.

Changes:
- Add @comfyorg/keybinding package with KeyComboImpl and KeybindingImpl classes
- Move core keybindings and reserved key constants to package
- Update workbench layer to import from package with backward compatibility
- Update all imports across codebase to use package exports
- Maintain existing API surface for consumers
This commit is contained in:
bymyself
2025-10-12 20:51:31 -07:00
parent 42ffdb2141
commit a476be3933
20 changed files with 200 additions and 137 deletions

View File

@@ -1,13 +1,14 @@
import { CORE_KEYBINDINGS } from '@/platform/keybinding/constants/coreKeybindings'
import {
CORE_KEYBINDINGS,
KeyComboImpl,
KeybindingImpl
} from '@comfyorg/keybinding'
import { useSettingStore } from '@/platform/settings/settingStore'
import { app } from '@/scripts/app'
import { useCommandStore } from '@/stores/commandStore'
import { useDialogStore } from '@/stores/dialogStore'
import {
KeyComboImpl,
KeybindingImpl,
useKeybindingStore
} from '@/workbench/keybindings/stores/keybindingStore'
import { useKeybindingStore } from '@/workbench/keybindings/stores/keybindingStore'
export const useKeybindingService = () => {
const keybindingStore = useKeybindingStore()