1.3 KiB
Refactor Plan: Non-Window Logic Migration from windowManager.js
Goal
windowManager.js를 순수 창 관리 모듈로 만들기 위해 비즈니스 로직을 해당 서비스와 featureBridge.js로 이전.
Steps (based on initial plan)
-
Shortcuts: Completed. Logic moved to
shortcutsService.jsand IPC tofeatureBridge.js. UsedinternalBridgefor coordination. -
Screenshot: Next. Move
captureScreenshotfunction and related IPC handlers fromwindowManager.jstoaskService.js(since it's primarily used there). UpdateaskService.jsto use its own screenshot method. Add IPC handlers tofeatureBridge.jsif needed. -
System Permissions: Create new
permissionService.jsinsrc/features/common/services/. Move all permission-related logic (check, request, open preferences, mark completed, etc.) and IPC handlers fromwindowManager.jsto the new service andfeatureBridge.js. -
API Key / Model State: Completely remove from
windowManager.js(e.g.,setupApiKeyIPCand helpers). Ensure all usages (e.g., inaskService.js) directly require and usemodelStateService.jsinstead.
Notes
- Maintain original logic without changes.
- Break circular dependencies if found.
- Use
internalBridgefor inter-module communication where appropriate. - After each step, verify no errors and test functionality.