feat(keyboard): ship AI mode surface with streaming search answers

Add the AI keyboard tab, Agent settings, and user-owned LLM key path for 1.7.0, including streaming answers and web-search transports without the built-in DeepSeek fallback.
This commit is contained in:
Rocky
2026-08-11 01:06:27 +08:00
parent f6212dcd2c
commit 3de665d254
81 changed files with 4467 additions and 398 deletions
@@ -17,6 +17,7 @@ public struct LiveConfigurationSnapshot {
public let asrModel: String
public let engineMode: String
public let polishIntensity: PolishIntensity
public let aiResponseLength: AIResponseLength
public let llmThinkingEnabled: Bool
public let personalDictionary: PersonalDictionary
public let polishStyleCatalog: PolishStyleCatalog
@@ -35,6 +36,7 @@ public struct LiveConfigurationSnapshot {
asrModel: String,
engineMode: String,
polishIntensity: PolishIntensity,
aiResponseLength: AIResponseLength = .default,
llmThinkingEnabled: Bool,
personalDictionary: PersonalDictionary,
polishStyleCatalog: PolishStyleCatalog,
@@ -52,6 +54,7 @@ public struct LiveConfigurationSnapshot {
self.asrModel = asrModel
self.engineMode = engineMode
self.polishIntensity = polishIntensity
self.aiResponseLength = aiResponseLength
self.llmThinkingEnabled = llmThinkingEnabled
self.personalDictionary = personalDictionary
self.polishStyleCatalog = polishStyleCatalog
@@ -73,6 +76,7 @@ public struct LiveConfigurationSnapshot {
asrModel: config.asrModel,
engineMode: config.engineMode,
polishIntensity: config.polishIntensity,
aiResponseLength: config.aiResponseLength,
llmThinkingEnabled: config.llmThinkingEnabled,
personalDictionary: fallback.personalDictionary,
polishStyleCatalog: fallback.polishStyleCatalog,
@@ -105,6 +109,7 @@ public struct LiveConfigurationStore: ConfigurationStore, @unchecked Sendable {
public var asrModel: String { snapshot.asrModel }
public var engineMode: String { snapshot.engineMode }
public var polishIntensity: PolishIntensity { snapshot.polishIntensity }
public var aiResponseLength: AIResponseLength { snapshot.aiResponseLength }
public var llmThinkingEnabled: Bool { snapshot.llmThinkingEnabled }
public var personalDictionary: PersonalDictionary { snapshot.personalDictionary }
public var polishStyleCatalog: PolishStyleCatalog { snapshot.polishStyleCatalog }