import ManaLLM import SwiftUI /// Drop-in-Komposition aus den drei Sections: BackendPicker, Prepare /// (sichtbar nur für Gemma-Backends), DownloadPolicy. /// /// **Typische Nutzung:** /// /// ```swift /// // In der Settings-Form der App: /// ManaLLMSettingsView( /// context: ManaLLMContext( /// useCaseShort: "Artikel-Zusammenfassung", /// useCaseLong: "fasst Artikel in zwei Sätze zusammen" /// ) /// ) /// ``` /// /// Apps die feinere Kontrolle wollen (z.B. zwischen den Sections eine /// app-eigene Section einschieben), nutzen die granularen /// `ManaLLM*Section`-Views direkt und teilen sich einen explizit /// erzeugten `ManaLLMSettingsState`. public struct ManaLLMSettingsView: View { @State private var state = ManaLLMSettingsState() private let context: ManaLLMContext public init(context: ManaLLMContext = .generic) { self.context = context } public var body: some View { Group { ManaLLMBackendPickerSection(state: state, context: context) if ManaLLMPrepareSection.shouldShow(for: state) { ManaLLMPrepareSection(state: state) } ManaLLMDownloadPolicySection(state: state) } .task { await state.refreshAvailability() } } }