using System.Collections.Generic; using System.Text.Json.Serialization; namespace AxCopilot.Models; public class LlmSettings { [JsonPropertyName("service")] public string Service { get; set; } = "ollama"; [JsonPropertyName("endpoint")] public string Endpoint { get; set; } = "http://localhost:11434"; [JsonPropertyName("model")] public string Model { get; set; } = ""; [JsonPropertyName("encryptedApiKey")] public string EncryptedApiKey { get; set; } = ""; [JsonPropertyName("apiKey")] public string ApiKey { get; set; } = ""; [JsonPropertyName("streaming")] public bool Streaming { get; set; } = true; [JsonPropertyName("maxContextTokens")] public int MaxContextTokens { get; set; } = 4096; [JsonPropertyName("retentionDays")] public int RetentionDays { get; set; } = 30; [JsonPropertyName("temperature")] public double Temperature { get; set; } = 0.7; [JsonPropertyName("registeredModels")] public List RegisteredModels { get; set; } = new List(); [JsonPropertyName("encryptionEnabled")] public bool EncryptionEnabled { get; set; } = false; [JsonPropertyName("promptTemplates")] public List PromptTemplates { get; set; } = new List(); [JsonPropertyName("workFolder")] public string WorkFolder { get; set; } = ""; [JsonPropertyName("recentWorkFolders")] public List RecentWorkFolders { get; set; } = new List(); [JsonPropertyName("maxRecentFolders")] public int MaxRecentFolders { get; set; } = 10; [JsonPropertyName("showFileBrowser")] public bool ShowFileBrowser { get; set; } = false; [JsonPropertyName("filePermission")] public string FilePermission { get; set; } = "Ask"; [JsonPropertyName("defaultAgentPermission")] public string DefaultAgentPermission { get; set; } = "Ask"; [JsonPropertyName("ollamaEndpoint")] public string OllamaEndpoint { get; set; } = "http://localhost:11434"; [JsonPropertyName("ollamaApiKey")] public string OllamaApiKey { get; set; } = ""; [JsonPropertyName("ollamaModel")] public string OllamaModel { get; set; } = ""; [JsonPropertyName("vllmEndpoint")] public string VllmEndpoint { get; set; } = ""; [JsonPropertyName("vllmApiKey")] public string VllmApiKey { get; set; } = ""; [JsonPropertyName("vllmModel")] public string VllmModel { get; set; } = ""; [JsonPropertyName("geminiApiKey")] public string GeminiApiKey { get; set; } = ""; [JsonPropertyName("geminiModel")] public string GeminiModel { get; set; } = "gemini-2.5-flash"; [JsonPropertyName("claudeApiKey")] public string ClaudeApiKey { get; set; } = ""; [JsonPropertyName("claudeModel")] public string ClaudeModel { get; set; } = "claude-sonnet-4-6"; [JsonPropertyName("defaultOutputFormat")] public string DefaultOutputFormat { get; set; } = "auto"; [JsonPropertyName("defaultMood")] public string DefaultMood { get; set; } = "modern"; [JsonPropertyName("autoPreview")] public string AutoPreview { get; set; } = "off"; [JsonPropertyName("maxAgentIterations")] public int MaxAgentIterations { get; set; } = 25; [JsonPropertyName("maxRetryOnError")] public int MaxRetryOnError { get; set; } = 3; [JsonPropertyName("maxTestFixIterations")] public int MaxTestFixIterations { get; set; } = 5; [JsonPropertyName("agentLogLevel")] public string AgentLogLevel { get; set; } = "simple"; [JsonPropertyName("enableParallelTools")] public bool EnableParallelTools { get; set; } = false; [JsonPropertyName("enableMultiPassDocument")] public bool EnableMultiPassDocument { get; set; } = false; [JsonPropertyName("enableCoworkVerification")] public bool EnableCoworkVerification { get; set; } = false; [JsonPropertyName("enableFilePathHighlight")] public bool EnableFilePathHighlight { get; set; } = true; [JsonPropertyName("multiPassThresholdPages")] public int MultiPassThresholdPages { get; set; } = 3; [JsonPropertyName("lastConversationIds")] public Dictionary LastConversationIds { get; set; } = new Dictionary(); [JsonPropertyName("folderDataUsage")] public string FolderDataUsage { get; set; } = "active"; [JsonPropertyName("agentDecisionLevel")] public string AgentDecisionLevel { get; set; } = "detailed"; [JsonPropertyName("planMode")] public string PlanMode { get; set; } = "off"; [JsonPropertyName("enableProjectRules")] public bool EnableProjectRules { get; set; } = true; [JsonPropertyName("fallbackModels")] public List FallbackModels { get; set; } = new List(); [JsonPropertyName("maxSubAgents")] public int MaxSubAgents { get; set; } = 3; [JsonPropertyName("pdfExportPath")] public string PdfExportPath { get; set; } = ""; [JsonPropertyName("enableAuditLog")] public bool EnableAuditLog { get; set; } = true; [JsonPropertyName("enableAgentMemory")] public bool EnableAgentMemory { get; set; } = true; [JsonPropertyName("maxMemoryEntries")] public int MaxMemoryEntries { get; set; } = 100; [JsonPropertyName("enableImageInput")] public bool EnableImageInput { get; set; } = true; [JsonPropertyName("maxImageSizeKb")] public int MaxImageSizeKb { get; set; } = 5120; [JsonPropertyName("enableAutoRouter")] public bool EnableAutoRouter { get; set; } = false; [JsonPropertyName("autoRouterConfidence")] public double AutoRouterConfidence { get; set; } = 0.7; [JsonPropertyName("modelCapabilities")] public List ModelCapabilities { get; set; } = new List(); [JsonPropertyName("mcpServers")] public List McpServers { get; set; } = new List(); [JsonPropertyName("enableChatRainbowGlow")] public bool EnableChatRainbowGlow { get; set; } = false; [JsonPropertyName("notifyOnComplete")] public bool NotifyOnComplete { get; set; } = false; [JsonPropertyName("showTips")] public bool ShowTips { get; set; } = false; [JsonPropertyName("tipDurationSeconds")] public int TipDurationSeconds { get; set; } = 5; [JsonPropertyName("devMode")] public bool DevMode { get; set; } = false; [JsonPropertyName("devModeStepApproval")] public bool DevModeStepApproval { get; set; } = false; [JsonPropertyName("workflowVisualizer")] public bool WorkflowVisualizer { get; set; } = false; [JsonPropertyName("freeTierMode")] public bool FreeTierMode { get; set; } = false; [JsonPropertyName("freeTierDelaySeconds")] public int FreeTierDelaySeconds { get; set; } = 4; [JsonPropertyName("showTotalCallStats")] public bool ShowTotalCallStats { get; set; } = false; [JsonPropertyName("blockedPaths")] public List BlockedPaths { get; set; } = new List { "*\\Windows\\*", "*\\Program Files\\*", "*\\Program Files (x86)\\*", "*\\System32\\*", "*\\AppData\\Local\\*", "*Documents*" }; [JsonPropertyName("blockedExtensions")] public List BlockedExtensions { get; set; } = new List { ".exe", ".dll", ".sys", ".msi", ".reg", ".vbs", ".com", ".scr", ".pif" }; [JsonPropertyName("customPresets")] public List CustomPresets { get; set; } = new List(); [JsonPropertyName("customMoods")] public List CustomMoods { get; set; } = new List(); [JsonPropertyName("disabledTools")] public List DisabledTools { get; set; } = new List(); [JsonPropertyName("toolPermissions")] public Dictionary ToolPermissions { get; set; } = new Dictionary(); [JsonPropertyName("enableToolHooks")] public bool EnableToolHooks { get; set; } = true; [JsonPropertyName("toolHookTimeoutMs")] public int ToolHookTimeoutMs { get; set; } = 10000; [JsonPropertyName("agentHooks")] public List AgentHooks { get; set; } = new List(); [JsonPropertyName("enableSkillSystem")] public bool EnableSkillSystem { get; set; } = true; [JsonPropertyName("skillsFolderPath")] public string SkillsFolderPath { get; set; } = ""; [JsonPropertyName("slashPopupPageSize")] public int SlashPopupPageSize { get; set; } = 7; [JsonPropertyName("favoriteSlashCommands")] public List FavoriteSlashCommands { get; set; } = new List(); [JsonPropertyName("enableDragDropAiActions")] public bool EnableDragDropAiActions { get; set; } = true; [JsonPropertyName("dragDropAutoSend")] public bool DragDropAutoSend { get; set; } = false; [JsonPropertyName("code")] public CodeSettings Code { get; set; } = new CodeSettings(); }