New release v2.3.9
- Jarvis integration: manage oAI-Web agents and usage from inside the app (/jarvis command, Settings tab 11) - Model category filter: keyword-based categorisation with popover picker in model selector - Categories shown in ModelInfoView with coloured chips; dot indicators on model rows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,7 @@ class SettingsService {
|
||||
static let googleSearchEngineID = "googleSearchEngineID"
|
||||
static let anytypeMcpAPIKey = "anytypeMcpAPIKey"
|
||||
static let paperlessAPIToken = "paperlessAPIToken"
|
||||
static let jarvisAPIKey = "jarvisAPIKey"
|
||||
}
|
||||
|
||||
// Old keychain keys (for migration only)
|
||||
@@ -500,6 +501,46 @@ class SettingsService {
|
||||
return !key.isEmpty
|
||||
}
|
||||
|
||||
// MARK: - Jarvis Settings
|
||||
|
||||
var jarvisEnabled: Bool {
|
||||
get { cache["jarvisEnabled"] == "true" }
|
||||
set {
|
||||
cache["jarvisEnabled"] = String(newValue)
|
||||
DatabaseService.shared.setSetting(key: "jarvisEnabled", value: String(newValue))
|
||||
}
|
||||
}
|
||||
|
||||
var jarvisURL: String {
|
||||
get { cache["jarvisURL"] ?? "" }
|
||||
set {
|
||||
let trimmed = newValue.trimmingCharacters(in: .whitespaces)
|
||||
if trimmed.isEmpty {
|
||||
cache.removeValue(forKey: "jarvisURL")
|
||||
DatabaseService.shared.deleteSetting(key: "jarvisURL")
|
||||
} else {
|
||||
cache["jarvisURL"] = trimmed
|
||||
DatabaseService.shared.setSetting(key: "jarvisURL", value: trimmed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var jarvisAPIKey: String? {
|
||||
get { try? DatabaseService.shared.getEncryptedSetting(key: EncryptedKeys.jarvisAPIKey) }
|
||||
set {
|
||||
if let value = newValue, !value.isEmpty {
|
||||
try? DatabaseService.shared.setEncryptedSetting(key: EncryptedKeys.jarvisAPIKey, value: value)
|
||||
} else {
|
||||
DatabaseService.shared.deleteEncryptedSetting(key: EncryptedKeys.jarvisAPIKey)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var jarvisConfigured: Bool {
|
||||
guard let key = jarvisAPIKey else { return false }
|
||||
return !jarvisURL.isEmpty && !key.isEmpty
|
||||
}
|
||||
|
||||
// MARK: - Bash Execution Settings
|
||||
|
||||
var bashEnabled: Bool {
|
||||
|
||||
Reference in New Issue
Block a user