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
@@ -13,6 +13,10 @@ public struct HistoryMutation: Codable, Equatable, Sendable, Identifiable {
case append
}
public enum UsageCategory: String, Codable, Sendable {
case ai
}
public let id: UUID
public let sequence: Int64
public let action: Action
@@ -20,6 +24,8 @@ public struct HistoryMutation: Codable, Equatable, Sendable, Identifiable {
public let expectedRevision: Int64?
public let text: String?
public let engineMode: String?
public let source: SpeechHistoryEntry.Source?
public let usageCategory: UsageCategory?
public let createdAt: TimeInterval
public init(
@@ -30,6 +36,8 @@ public struct HistoryMutation: Codable, Equatable, Sendable, Identifiable {
expectedRevision: Int64? = nil,
text: String? = nil,
engineMode: String? = nil,
source: SpeechHistoryEntry.Source? = nil,
usageCategory: UsageCategory? = nil,
createdAt: TimeInterval = Date().timeIntervalSince1970
) {
self.id = id
@@ -39,6 +47,8 @@ public struct HistoryMutation: Codable, Equatable, Sendable, Identifiable {
self.expectedRevision = expectedRevision
self.text = text
self.engineMode = engineMode
self.source = source
self.usageCategory = usageCategory
self.createdAt = createdAt
}
}