Skip to content

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

feat(settings): split AI providers and cleanup styles

altic-dev6f481913120b
diff --git a/Sources/Fluid/AppDelegate.swift b/Sources/Fluid/AppDelegate.swift
index 3e22814f..b674e888 100644
--- a/Sources/Fluid/AppDelegate.swift
+++ b/Sources/Fluid/AppDelegate.swift
@@ -238,7 +238,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
private func showMLXUpgradeOffer() {
let alert = NSAlert()
alert.messageText = "Fluid-1 is now 2.2x faster"
- alert.informativeText = "A new 3.77 GB MLX model is available for Apple silicon. Continue to AI Enhancement to download and verify it. Your current slower model will keep working unless you choose to upgrade."
+ alert.informativeText = "A new 3.77 GB MLX model is available for Apple silicon. Continue to AI Providers to download and verify it. Your current slower model will keep working unless you choose to upgrade."
alert.alertStyle = .informational
alert.addButton(withTitle: "Continue to Download")
alert.addButton(withTitle: "Keep Current Model")
diff --git a/Sources/Fluid/ContentView.swift b/Sources/Fluid/ContentView.swift
index 356a5288..b9f94615 100644
--- a/Sources/Fluid/ContentView.swift
+++ b/Sources/Fluid/ContentView.swift
@@ -37,7 +37,7 @@ enum AIProcessingError: LocalizedError {
}
}
- /// Configuration errors the user can fix in AI Enhancement settings.
+ /// Configuration errors the user can fix in AI Providers.
var isConfigurationError: Bool {
switch self {
case .noVerifiedProvider, .missingAPIKey, .missingModel:
@@ -1214,7 +1214,8 @@ struct ContentView: View {
List(selection: self.$selectedSidebarItem) {
Section {
self.sidebarNavigationLink(.voiceEngine, title: "Voice Engine", systemImage: "waveform")
- self.sidebarNavigationLink(.aiEnhancements, title: "AI Enhancement", systemImage: "brain")
+ self.sidebarNavigationLink(.aiEnhancements, title: "AI Providers", systemImage: "cpu")
+ self.sidebarNavigationLink(.cleanupStyles, title: "Cleanup Styles", systemImage: "wand.and.stars")
self.sidebarNavigationLink(.customDictionary, title: "Custom Dictionary", systemImage: "text.book.closed.fill")
} header: {
self.sidebarSectionHeader("Configure")
@@ -1545,10 +1546,11 @@ struct ContentView: View {
appServices: self.appServices,
theme: self.theme
))
- case .aiEnhancements:
+ case .aiEnhancements, .cleanupStyles:
return AnyView(AIEnhancementSettingsScreen(
menuBarManager: self.menuBarManager,
theme: self.theme,
+ selectedConfigurationSection: self.aiEnhancementConfigurationSectionBinding,
activeShortcutRecordingTarget: self.$activeShortcutRecordingTarget,
shortcutRecordingMessage: self.$shortcutRecordingMessage
))
@@ -1571,6 +1573,18 @@ struct ContentView: View {
}
}
+ private var aiEnhancementConfigurationSectionBinding: Binding<AIEnhancementConfigurationSection> {
+ Binding(
+ get: {
+ self.selectedSidebarItem?.aiEnhancementConfigurationSection ?? .providers
+ },
+ set: { section in
+ guard self.selectedSidebarItem != section.sidebarItem else { return }
+ self.navigateToApp(section.sidebarItem)
+ }
+ )
+ }
+
private var onboardingOnlyView: some View {
OnboardingFlowView(
currentStep: Binding(
@@ -2609,7 +2623,7 @@ struct ContentView: View {
aiError.isConfigurationError
{
NotificationService.showAIProcessingFallback(
- error: "\(aiError.localizedDescription). Open AI Enhancement settings to configure a provider."
+ error: "\(aiError.localizedDescription). Open AI Providers to configure a provider."
)
} else {
NotificationService.showAIProcessingFallback(error: error.localizedDescription)
@@ -4718,6 +4732,8 @@ private enum SidebarSymbolCache {
private static let symbolNames = [
"waveform",
"brain",
+ "cpu",
+ "wand.and.stars",
"text.book.closed.fill",
"terminal.fill",
"doc.text.fill",
diff --git a/Sources/Fluid/Persistence/SettingsStore+CommandMode.swift b/Sources/Fluid/Persistence/SettingsStore+CommandMode.swift
index 7c9a06eb..1de1b67a 100644
--- a/Sources/Fluid/Persistence/SettingsStore+CommandMode.swift
+++ b/Sources/Fluid/Persistence/SettingsStore+CommandMode.swift
@@ -71,9 +71,9 @@ extension SettingsStore {
guard self.isCommandModeProviderVerified(providerID) else {
if self.commandModeLinkedToGlobal {
- return "Command Mode needs a verified chat provider. Verify the synced AI Enhancement provider, or turn Sync off and choose one for Command Mode."
+ return "Command Mode needs a verified chat provider. Verify the synced provider in AI Providers, or turn Sync off and choose one for Command Mode."
}
- return "Command Mode needs a verified chat provider. Verify this provider in AI Enhancement before using Command Mode."
+ return "Command Mode needs a verified chat provider. Verify this provider in AI Providers before using Command Mode."
}
return nil
diff --git a/Sources/Fluid/UI/AISettings/AIEnhancementSettingsView.swift b/Sources/Fluid/UI/AISettings/AIEnhancementSettingsView.swift
index 81f399aa..6d1aa31b 100644
--- a/Sources/Fluid/UI/AISettings/AIEnhancementSettingsView.swift
+++ b/Sources/Fluid/UI/AISettings/AIEnhancementSettingsView.swift
@@ -1,28 +1,28 @@
import SwiftUI
-enum AIEnhancementConfigurationSection: String, CaseIterable, Identifiable {
+enum AIEnhancementConfigurationSection: String {
case providers
case advancedPrompts
- var id: String {
- self.rawValue
- }
-
- var title: String {
+ var sidebarItem: SidebarItem {
switch self {
case .providers:
- return "AI Providers"
+ return .aiEnhancements
case .advancedPrompts:
- return "Advanced Prompts"
+ return .cleanupStyles
}
}
+}
- var systemImage: String {
+extension SidebarItem {
+ var aiEnhancementConfigurationSection: AIEnhancementConfigurationSection? {
switch self {
- case .providers:
- return "cpu"
- case .advancedPrompts:
- return "slider.horizontal.3"
+ case .aiEnhancements:
+ return .providers
+ case .cleanupStyles:
+ return .advancedPrompts
+ default:
+ return nil
}
}
}
@@ -76,14 +76,13 @@ struct AIEnhancementSettingsView: View {
@ObservedObject var settings: SettingsStore
@ObservedObject var promptTest: DictationPromptTestCoordinator
let theme: AppTheme
+ @Binding var selectedConfigurationSection: AIEnhancementConfigurationSection
@Binding var activeShortcutRecordingTarget: ShortcutRecordingTarget?
@Binding var shortcutRecordingMessage: String?
@State var expandedProviderID: String? = nil
@State var providerSearchText: String = ""
@State var privateAISelectedModelID: String = PrivateAIIntegrationService.configuredModelID
@State var privateAILoadState: PrivateAIModelLoadState = .idle
- @State var selectedConfigurationSection: AIEnhancementConfigurationSection = .providers
- @State var hoveredConfigurationSection: AIEnhancementConfigurationSection?
@State var hoveredPromptCardKey: String? = nil
@State var selectedPromptMode: SettingsStore.PromptMode = .dictate
@State var hoveredPromptModeKey: String? = nil
diff --git a/Sources/Fluid/UI/AISettings/AISettingsScreens.swift b/Sources/Fluid/UI/AISettings/AISettingsScreens.swift
index 0882285d..565cc8b2 100644
--- a/Sources/Fluid/UI/AISettings/AISettingsScreens.swift
+++ b/Sources/Fluid/UI/AISettings/AISettingsScreens.swift
@@ -29,6 +29,7 @@ struct VoiceEngineSettingsScreen: View {
struct AIEnhancementSettingsScreen: View {
let menuBarManager: MenuBarManager
let theme: AppTheme
+ @Binding var selectedConfigurationSection: AIEnhancementConfigurationSection
@Binding var activeShortcutRecordingTarget: ShortcutRecordingTarget?
@Binding var shortcutRecordingMessage: String?
@@ -37,11 +38,13 @@ struct AIEnhancementSettingsScreen: View {
init(
menuBarManager: MenuBarManager,
theme: AppTheme,
+ selectedConfigurationSection: Binding<AIEnhancementConfigurationSection> = .constant(.providers),
activeShortcutRecordingTarget: Binding<ShortcutRecordingTarget?> = .constant(nil),
shortcutRecordingMessage: Binding<String?> = .constant(nil)
) {
self.menuBarManager = menuBarManager
self.theme = theme
+ _selectedConfigurationSection = selectedConfigurationSection
_activeShortcutRecordingTarget = activeShortcutRecordingTarget
_shortcutRecordingMessage = shortcutRecordingMessage
_viewModel = StateObject(wrappedValue: AIEnhancementSettingsViewModel(
@@ -59,6 +62,7 @@ struct AIEnhancementSettingsScreen: View {
settings: self.viewModel.settings,
promptTest: self.viewModel.promptTest,
theme: self.theme,
+ selectedConfigurationSection: self.$selectedConfigurationSection,
activeShortcutRecordingTarget: self.$activeShortcutRecordingTarget,
shortcutRecordingMessage: self.$shortcutRecordingMessage
)
diff --git a/Sources/Fluid/UI/AISettingsView+AIConfiguration.swift b/Sources/Fluid/UI/AISettingsView+AIConfiguration.swift
index ea15be29..72248ecc 100644
--- a/Sources/Fluid/UI/AISettingsView+AIConfiguration.swift
+++ b/Sources/Fluid/UI/AISettingsView+AIConfiguration.swift
@@ -51,7 +51,6 @@ extension AIEnhancementSettingsView {
ThemedCard(style: .prominent, hoverEffect: false) {
VStack(alignment: .leading, spacing: 16) {
self.aiSetupHeader
- self.aiConfigurationSectionPicker
Group {
switch self.selectedConfigurationSection {
@@ -70,7 +69,9 @@ extension AIEnhancementSettingsView {
}
private var aiSetupHeader: some View {
- HStack(spacing: 12) {
+ let isProviders = self.selectedConfigurationSection == .providers
+
+ return HStack(spacing: 12) {
ZStack {
RoundedRectangle(cornerRadius: 10, style: .continuous)
.fill(self.theme.palette.contentBackground.opacity(0.82))
@@ -87,18 +88,20 @@ extension AIEnhancementSettingsView {
.stroke(self.theme.palette.accent.opacity(0.35), lineWidth: 1)
)
- Image(systemName: "brain")
+ Image(systemName: isProviders ? "cpu" : "wand.and.stars")
.font(.system(size: 15, weight: .semibold))
.foregroundStyle(self.theme.palette.accent)
}
.frame(width: 34, height: 34)
VStack(alignment: .leading, spacing: 2) {
- Text("AI Enhancement")
+ Text(isProviders ? "AI Providers" : "Cleanup Styles")
.font(.title3)
.fontWeight(.semibold)
.foregroundStyle(self.theme.palette.primaryText)
- Text("Set up providers and prompt behavior separately.")
+ Text(isProviders
+ ? "Configure local models and API providers."
+ : "Choose how FluidVoice cleans up your dictation.")
.font(.caption)
.foregroundStyle(self.theme.palette.secondaryText)
}
@@ -107,63 +110,6 @@ extension AIEnhancementSettingsView {
}
}
- private var aiConfigurationSectionPicker: some View {
- HStack(spacing: 3) {
- ForEach(AIEnhancementConfigurationSection.allCases) { section in
- self.aiConfigurationSectionButton(section)
- }
- }
- .padding(4)
- .background(
- Capsule(style: .continuous)
- .fill(self.theme.palette.contentBackground.opacity(0.78))
- .overlay(
- Capsule(style: .continuous)
- .stroke(self.theme.palette.cardBorder.opacity(0.24), lineWidth: 1)
- )
- )
- .frame(maxWidth: .infinity, alignment: .center)
- .accessibilityElement(children: .contain)
- }
-
- private func aiConfigurationSectionButton(_ section: AIEnhancementConfigurationSection) -> some View {
- let isSelected = self.selectedConfigurationSection == section
- let isHovering = self.hoveredConfigurationSection == section
- let tone = self.theme.palette.accent
- let shape = Capsule(style: .continuous)
-
- return Button {
- self.selectedConfigurationSection = section
- } label: {
- HStack(spacing: 8) {
- Image(systemName: section.systemImage)
- .font(.system(size: 12, weight: .semibold))
- Text(section.title)
- .font(.system(size: 13, weight: .semibold))
- }
- .foregroundStyle(isSelected ? tone : (isHovering ? self.theme.palette.primaryText : self.theme.palette.secondaryText))
- .frame(width: 176, height: 36)
- .contentShape(shape)
- .background(
- shape
- .fill(isSelected ? tone.opacity(0.13) : (isHovering ? self.theme.palette.cardBackground.opacity(0.66) : .clear))
- .overlay(
- shape
- .stroke(isSelected ? tone.opacity(0.46) : (isHovering ? self.theme.palette.cardBorder.opacity(0.36) : .clear), lineWidth: 1)
- )
- .shadow(color: isSelected ? tone.opacity(0.18) : .clear, radius: 8, x: 0, y: 2)
- )
- }
- .buttonStyle(.plain)
- .accessibilityLabel(section.title)
- .accessibilityAddTraits(isSelected ? .isSelected : [])
- .onHover { hovering in
- self.hoveredConfigurationSection = hovering ? section : nil
- }
- .animation(.easeOut(duration: 0.12), value: isHovering)
- .animation(.easeOut(duration: 0.12), value: isSelected)
- }
-
private var providerConfigurationContent: some View {
VStack(alignment: .leading, spacing: 16) {
self.aiSetupSummaryBar
@@ -1960,7 +1906,7 @@ extension AIEnhancementSettingsView {
Image(systemName: "text.bubble.fill")
.font(.system(size: 12, weight: .medium))
.foregroundStyle(self.theme.palette.accent)
- Text("Advanced Prompts")
+ Text("Styles")
.font(.system(size: 14, weight: .semibold))
.lineLimit(1)
.truncationMode(.tail)
diff --git a/Sources/Fluid/UI/AISettingsView.swift b/Sources/Fluid/UI/AISettingsView.swift
index 40821902..816d9e81 100644
--- a/Sources/Fluid/UI/AISettingsView.swift
+++ b/Sources/Fluid/UI/AISettingsView.swift
@@ -104,6 +104,7 @@ struct AISettingsView: View {
@StateObject private var voiceViewModel: VoiceEngineSettingsViewModel
@StateObject private var enhancementViewModel: AIEnhancementSettingsViewModel
+ @State private var selectedEnhancementSection: AIEnhancementConfigurationSection = .providers
init(appServices: AppServices, menuBarManager: MenuBarManager, theme: AppTheme) {
self.appServices = appServices
@@ -133,6 +134,7 @@ struct AISettingsView: View {
settings: self.enhancementViewModel.settings,
promptTest: self.enhancementViewModel.promptTest,
theme: self.theme,
+ selectedConfigurationSection: self.$selectedEnhancementSection,
activeShortcutRecordingTarget: .constant(nil),
shortcutRecordingMessage: .constant(nil)
)
diff --git a/Sources/Fluid/UI/AppNavigationState.swift b/Sources/Fluid/UI/AppNavigationState.swift
index 5e2d7de5..fd22fabe 100644
--- a/Sources/Fluid/UI/AppNavigationState.swift
+++ b/Sources/Fluid/UI/AppNavigationState.swift
@@ -11,6 +11,7 @@ enum SidebarItem: Hashable {
case welcome
case voiceEngine
case aiEnhancements
+ case cleanupStyles
case meetingTools
case customDictionary
case stats
diff --git a/Sources/Fluid/UI/OnboardingAIEnhancementStepView.swift b/Sources/Fluid/UI/OnboardingAIEnhancementStepView.swift
index 1ded51aa..1790bd49 100644
--- a/Sources/Fluid/UI/OnboardingAIEnhancementStepView.swift
+++ b/Sources/Fluid/UI/OnboardingAIEnhancementStepView.swift
@@ -336,7 +336,7 @@ struct OnboardingAIEnhancementStepView: View {
if self.shouldShowTryout {
return "Try it below before finishing setup."
}
- return "You can change this later in AI Enhancement settings."
+ return "You can change this later in AI Providers."
}
private func playgroundSection(containerWidth: CGFloat) -> some View {
diff --git a/Sources/Fluid/UI/WelcomeView.swift b/Sources/Fluid/UI/WelcomeView.swift
index 4118a911..cb12efea 100644
--- a/Sources/Fluid/UI/WelcomeView.swift
+++ b/Sources/Fluid/UI/WelcomeView.swift
@@ -157,7 +157,7 @@ struct WelcomeView: View {
action: {
self.selectedSidebarItem = .aiEnhancements
},
- actionButtonTitle: "Configure AI"
+ actionButtonTitle: "AI Providers"
)
SetupStepView(
@@ -508,14 +508,14 @@ struct WelcomeView: View {
Spacer()
- Button("Open AI Settings") {
+ Button("Open AI Providers") {
self.selectedSidebarItem = .aiEnhancements
}
.buttonStyle(.bordered)
.controlSize(.small)
}
- Label("Configure an AI model provider in AI Settings before using Edit Mode.", systemImage: "info.circle")
+ Label("Configure an AI model provider in AI Providers before using Edit Mode.", systemImage: "info.circle")
.font(self.theme.typography.caption)
.foregroundStyle(.secondary)
diff --git a/Sources/Fluid/Views/CommandModeView.swift b/Sources/Fluid/Views/CommandModeView.swift
index 7de3385f..d0ae0128 100644
--- a/Sources/Fluid/Views/CommandModeView.swift
+++ b/Sources/Fluid/Views/CommandModeView.swift
@@ -489,7 +489,7 @@ struct CommandModeView: View {
Spacer(minLength: 8)
- Button("AI Settings") {
+ Button("AI Providers") {
AppNavigationRouter.shared.request(.aiEnhancements)
}
.font(.caption)
@@ -515,7 +515,7 @@ struct CommandModeView: View {
.font(.callout)
.foregroundStyle(.secondary)
.fixedSize(horizontal: true, vertical: false)
- .help("Use the same provider and model selected in AI Enhancement.")
+ .help("Use the same provider and model selected in AI Providers.")
SearchableProviderPicker(
builtInProviders: self.verifiedBuiltInProvidersList,
diff --git a/Tests/FluidDictationIntegrationTests/SettingsNavigationStateTests.swift b/Tests/FluidDictationIntegrationTests/SettingsNavigationStateTests.swift
index 0a33a213..cc6ab45b 100644
--- a/Tests/FluidDictationIntegrationTests/SettingsNavigationStateTests.swift
+++ b/Tests/FluidDictationIntegrationTests/SettingsNavigationStateTests.swift
@@ -53,6 +53,16 @@ final class SettingsNavigationStateTests: XCTestCase {
XCTAssertFalse(state.isLeaving(.dictation, for: .dictation))
}
+ func testAIProviderAndCleanupRoutesMapToSeparateSections() {
+ XCTAssertEqual(SidebarItem.aiEnhancements.aiEnhancementConfigurationSection, .providers)
+ XCTAssertEqual(SidebarItem.cleanupStyles.aiEnhancementConfigurationSection, .advancedPrompts)
+ }
+
+ func testUnrelatedRoutesDoNotSelectAIConfigurationSections() {
+ XCTAssertNil(SidebarItem.voiceEngine.aiEnhancementConfigurationSection)
+ XCTAssertNil(SidebarItem.customDictionary.aiEnhancementConfigurationSection)
+ }
+
func testInactiveSettingsSearchResignsFirstResponder() {
let window = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 240, height: 80),