Added a lot of functionality. Bugfixes and changes

This commit is contained in:
2026-02-15 16:46:06 +01:00
parent 2434e554f8
commit 04c9b8da1e
31 changed files with 6653 additions and 239 deletions

View File

@@ -20,7 +20,8 @@ struct Settings: Codable {
var streamEnabled: Bool
var maxTokens: Int
var systemPrompt: String?
var customPromptMode: CustomPromptMode
// Feature flags
var onlineMode: Bool
var memoryEnabled: Bool
@@ -58,7 +59,7 @@ struct Settings: Codable {
case anthropicNative = "anthropic_native"
case duckduckgo
case google
var displayName: String {
switch self {
case .anthropicNative: return "Anthropic Native"
@@ -67,6 +68,25 @@ struct Settings: Codable {
}
}
}
enum CustomPromptMode: String, Codable, CaseIterable {
case append = "append"
case replace = "replace"
var displayName: String {
switch self {
case .append: return "Append to Default"
case .replace: return "Replace Default (BYOP)"
}
}
var description: String {
switch self {
case .append: return "Your custom prompt will be added after the default system prompt"
case .replace: return "Only use your custom prompt (Bring Your Own Prompt)"
}
}
}
// Default settings
static let `default` = Settings(
@@ -79,6 +99,7 @@ struct Settings: Codable {
streamEnabled: true,
maxTokens: 4096,
systemPrompt: nil,
customPromptMode: .append,
onlineMode: false,
memoryEnabled: true,
mcpEnabled: false,