You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 Fix: Also use dynamic import for AIService module in IpcMain
The previous commit lazy-loaded AIService instance creation, but the
IpcMain module still had a static import of AIService at the top:
import { AIService } from "@/services/aiService";
This meant that when loadServices() did await import("./services/ipcMain"),
it would immediately trigger loading of AIService module, which then
statically imports the massive "ai" package (~3s).
Fix: Change to type-only import and use require() in the getter.
This ensures the AI SDK is not loaded until AIService is first accessed.
0 commit comments