Files
2026-07-13 12:22:33 +08:00

28 lines
771 B
Swift

import CodexBarCore
import Foundation
struct DeepSeekProviderImplementation: ProviderImplementation {
let id: UsageProvider = .deepseek
@MainActor
func presentation(context _: ProviderPresentationContext) -> ProviderPresentation {
ProviderPresentation { _ in "api" }
}
@MainActor
func observeSettings(_: SettingsStore) {}
@MainActor
func isAvailable(context: ProviderAvailabilityContext) -> Bool {
if DeepSeekSettingsReader.apiKey(environment: context.environment) != nil {
return true
}
return !context.settings.tokenAccounts(for: .deepseek).isEmpty
}
@MainActor
func settingsFields(context _: ProviderSettingsContext) -> [ProviderSettingsFieldDescriptor] {
[]
}
}