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:
@@ -20,7 +20,7 @@ public struct LLMRequest: Codable, Sendable {
|
||||
case topP = "top_p"
|
||||
}
|
||||
|
||||
public enum Message: Codable, Sendable {
|
||||
public enum Message: Codable, Equatable, Sendable {
|
||||
case system(String)
|
||||
case user(String)
|
||||
case assistant(String)
|
||||
@@ -54,6 +54,21 @@ public struct LLMRequest: Codable, Sendable {
|
||||
debugDescription: "Unknown role \(role)")
|
||||
}
|
||||
}
|
||||
|
||||
public var role: String {
|
||||
switch self {
|
||||
case .system: return "system"
|
||||
case .user: return "user"
|
||||
case .assistant: return "assistant"
|
||||
}
|
||||
}
|
||||
|
||||
public var content: String {
|
||||
switch self {
|
||||
case .system(let value), .user(let value), .assistant(let value):
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public init(
|
||||
|
||||
Reference in New Issue
Block a user