* refactoring the bridge * Update aec submodule * folder structure refactor * fixing ask logic * resolve import err * fix askview * fix header content html path * fix systemaudiodump path * centralized ask logic * delete legacy code * change askservice to class * settingsService facade * fix getCurrentModelInfo * common service ipc moved to featureBridge * featureBridge init * ui fix * add featureBridge func for listenservice * fix preload conflict * shortcuts seperated * refactor ask * transfer roles from askview to askservice * modifying windowBridge * delete legacy ask code * retrieve conversation history for askserice * fix legacy code * shortcut moved * change naming for featurebridge * screenshot moved from windowManager * rough refactor done --------- Co-authored-by: sanio <sanio@pickle.com> Co-authored-by: jhyang0 <junhyuck0819@gmail.com>
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.