Files
CxIDE/EngineFactory.swift
T
cx-git-agent c118996746 feat: CxIDE v1 — native macOS SwiftUI IDE with agentic AI assistant
- SwiftUI macOS app with C++17 code analysis engine (ObjC++ bridge)
- Agentic AI loop: LLM plans → tool calls → execution → feedback loop
- 15 agent tools: file ops, terminal, git, xcode build, code intel
- 7 persistent terminal tools with background session management
- Chat sidebar with agent step rendering and auto-apply
- NVIDIA NIM API integration (Llama 3.3 70B default)
- OpenAI tool_calls format with prompt-based fallback
- Code editor with syntax highlighting and multi-tab support
- File tree, console view, terminal view
- Git integration and workspace management
2026-04-21 16:05:52 -05:00

45 lines
1.0 KiB
Swift

import Foundation
enum EngineType: String, CaseIterable {
case swift = "Swift Toolchain"
case sandbox = "Sandbox (Safe)"
var description: String {
switch self {
case .swift: return "Full Swift execution via system toolchain (macOS only)"
case .sandbox: return "Safe interpreter with limited Swift subset"
}
}
}
enum EngineFactory {
static func make(_ type: EngineType) -> CodeEngine {
switch type {
case .swift:
#if os(macOS)
return SwiftCodeEngine()
#else
return SandboxedSwiftEngine()
#endif
case .sandbox:
return SandboxedSwiftEngine()
}
}
static func makeDefault() -> CodeEngine {
#if os(macOS)
return SwiftCodeEngine()
#else
return SandboxedSwiftEngine()
#endif
}
static var availableEngines: [EngineType] {
#if os(macOS)
return EngineType.allCases
#else
return [.sandbox]
#endif
}
}