import Cocoa @main class AppDelegate: NSObject, NSApplicationDelegate { var mainWindow: MainWindowController! func applicationDidFinishLaunching(_ notification: Notification) { NSLog("=== App launched ===") AIManager.shared.updateService() NSLog("Creating main window...") mainWindow = MainWindowController() NSLog("Showing window...") mainWindow.showWindow(nil) NSLog("Window visible: \(mainWindow.window?.isVisible ?? false)") NSLog("Window frame: \(mainWindow.window?.frame ?? .zero)") NSApp.activate(ignoringOtherApps: true) NSLog("=== Setup complete ===") } func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } }