Something went wrong. Try again.
A fully native SwiftUI ADE Proof of Concept that leverages macOS on-device intelligence to create a fully featured coding agent experience
Something went wrong. Try again.
1.4 kB · 35 lines
Swift
at main
123456789101112131415161718192021222324252627282930313233343536import ADEKitimport SwiftUI
@main struct CodeEditorApp: App { @NSApplicationDelegateAdaptor(AppDelegate.self) private var delegate @State private var store: WorkspaceStore? @State private var startupError: String? init() { do { _store = State(initialValue: try WorkspaceStore()) } catch { _startupError = State(initialValue: error.localizedDescription) } } var body: some Scene { WindowGroup("Code Editor", id: "workspace", for: UUID.self) { $windowID in if let store { WorkspaceView(store: store, windowID: windowID ?? WorkspaceStore.mainWindowID) .fontDesign(.monospaced) } else { ContentUnavailableView( "Unable to Open Workspace", systemImage: "externaldrive.badge.exclamationmark", description: Text(startupError ?? "Unknown storage error") ) .fontDesign(.monospaced) } }.defaultSize(width: 1440, height: 900).commands { WorkspaceCommands() } Settings { ADESettingsView().fontDesign(.monospaced) } }}
@MainActor final class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ notification: Notification) { NSApp.setActivationPolicy(.regular) NSApp.activate(ignoringOtherApps: true) }}