SPB Git

spb/zyquo-router Public MIT

One local endpoint, every AI provider — a private OpenAI-compatible LLM gateway for your Mac (170 models, 12 providers).

Swift 95.7% Python 2.3% Shell 1.2% Makefile 0.9%
1.2 KB · 46 lines swift
Raw Blame History
1//2//  AppEnvironment.swift3//  Zyquo Router4//5//  Author: Simon-Pierre Boucher6//  Mail: contact@spboucher.ai7//8//  Composition root for the app's observable stores. Owned by the App and9//  injected into the view tree as environment objects.10//1112import SwiftUI1314@MainActor15final class AppEnvironment: ObservableObject {16    let server = ServerController()17    let catalog = ModelCatalog()18    let appearance = AppearanceStore()19    let vault = KeyVaultStore()20    let localKeys = LocalKeysStore()21    let routerConfig = RouterConfigStore()22}2324/// Navigator sections (⌘1–6).25enum AppSection: String, CaseIterable, Identifiable {26    case dashboard = "Dashboard"27    case models = "Models"28    case requests = "Requests"29    case keys = "Keys"30    case playground = "Playground"31    case docs = "Docs"3233    var id: String { rawValue }3435    var systemImage: String {36        switch self {37        case .dashboard: return "gauge.with.dots.needle.50percent"38        case .models: return "square.grid.2x2"39        case .requests: return "list.bullet.rectangle"40        case .keys: return "key"41        case .playground: return "paperplane"42        case .docs: return "book"43        }44    }45}46