Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
fix: honor prompt selection for private ai
altic-devc741cc06521f
diff --git a/Sources/Fluid/Services/DictationAIPostProcessingGate.swift b/Sources/Fluid/Services/DictationAIPostProcessingGate.swiftindex 0dd5ea2f..62dfa2de 100644--- a/Sources/Fluid/Services/DictationAIPostProcessingGate.swift+++ b/Sources/Fluid/Services/DictationAIPostProcessingGate.swift@@ -12,7 +12,8 @@ enum DictationAIPostProcessingGate {static func isConfigured(for slot: SettingsStore.DictationShortcutSlot, appBundleID: String? = nil) -> Bool {let settings = SettingsStore.shared- guard settings.dictationPromptSelection(for: slot) != .off else { return false }+ let promptSelection = settings.dictationPromptSelection(for: slot)+ guard promptSelection != .off else { return false }if let appBundleID,settings.promptRoutingScope(for: .dictate) == .selectedAppsOnly,!settings.hasAppPromptBinding(for: .dictate, appBundleID: appBundleID)@@ -20,10 +21,12 @@ enum DictationAIPostProcessingGate {return false}- if PrivateAIProviderPromptFormat.isAvailable(settings: settings) {+ if promptSelection == .privateAI {return self.isPrivateProviderConfigured(settings: settings)}+ if self.isSelectedPrivateProvider(settings: settings) { return false }+return self.isProviderConfigured()}@@ -86,6 +89,11 @@ enum DictationAIPostProcessingGate {PrivateAIProviderPromptFormat.verifiedModelID(settings: settings) != nil}+ private static func isSelectedPrivateProvider(settings: SettingsStore) -> Bool {+ PrivateFeatures.privateAIProvider &&+ settings.selectedProviderID == PrivateAIProviderFeature.shared.providerID+ }+static func isLocalEndpoint(_ urlString: String) -> Bool {guard let url = URL(string: urlString), let host = url.host else { return false }let hostLower = host.lowercased()diff --git a/Sources/Fluid/Services/DictationPostProcessingService.swift b/Sources/Fluid/Services/DictationPostProcessingService.swiftindex 28ec06d3..fd47ca0a 100644--- a/Sources/Fluid/Services/DictationPostProcessingService.swift+++ b/Sources/Fluid/Services/DictationPostProcessingService.swift@@ -36,11 +36,18 @@ final class DictationPostProcessingService {source: "DictationPostProcessingService")+ let usesPrivateAISelection = settings.dictationPromptSelection(for: dictationSlot) == .privateAIlet isPrivateAIProvider = resolved.providerID == PrivateAIProviderFeature.shared.providerID ||resolved.providerKey == PrivateAIProviderFeature.shared.providerID ||resolved.providerKey == "custom:\(PrivateAIProviderFeature.shared.providerID)"- if isPrivateAIProvider || PrivateAIIntegrationService.shouldHandleDictation(model: resolved.model) {+ guard usesPrivateAISelection || !isPrivateAIProvider else {+ throw AIProcessingError.noVerifiedProvider+ }++ if usesPrivateAISelection,+ isPrivateAIProvider || PrivateAIIntegrationService.shouldHandleDictation(model: resolved.model)+ {let response = try await PrivateAIIntegrationService.shared.enhanceDictation(trimmed,runtime: PrivateAIIntegrationService.RuntimeConfiguration(