refactor: centralize common strings, paths, and default values into a new Constants class.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using Toak.Core;
|
||||
using Toak.Serialization;
|
||||
using Toak.Core.Interfaces;
|
||||
|
||||
@@ -8,12 +9,11 @@ namespace Toak.Configuration;
|
||||
|
||||
public class ConfigManager : IConfigProvider
|
||||
{
|
||||
private readonly string ConfigDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config", "toak");
|
||||
private readonly string ConfigPath;
|
||||
private readonly string ConfigDir = Constants.Paths.ConfigDir;
|
||||
private readonly string ConfigPath = Constants.Paths.ConfigFile;
|
||||
|
||||
public ConfigManager()
|
||||
{
|
||||
ConfigPath = Path.Combine(ConfigDir, "config.json");
|
||||
}
|
||||
|
||||
public ToakConfig LoadConfig()
|
||||
|
||||
@@ -8,8 +8,8 @@ public class ToakConfig
|
||||
public bool ModuleTechnicalSanitization { get; set; } = true;
|
||||
|
||||
public string WhisperLanguage { get; set; } = string.Empty;
|
||||
public string LlmModel { get; set; } = "openai/gpt-oss-20b";
|
||||
public string WhisperModel { get; set; } = "whisper-large-v3-turbo";
|
||||
public string LlmModel { get; set; } = Toak.Core.Constants.Defaults.LlmModel;
|
||||
public string WhisperModel { get; set; } = Toak.Core.Constants.Defaults.WhisperModel;
|
||||
public string StartSoundPath { get; set; } = "Assets/Audio/beep.wav";
|
||||
public string StopSoundPath { get; set; } = "Assets/Audio/beep.wav";
|
||||
public List<string> ActiveSkills { get; set; } = new List<string> { "Terminal", "Translate" };
|
||||
|
||||
Reference in New Issue
Block a user