mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 10:29:07 +00:00
parent
76dd08ee11
commit
60febfec86
@ -98,7 +98,7 @@ public sealed class Data
|
||||
/// <summary>
|
||||
/// The live translation interval for debouncing in milliseconds.
|
||||
/// </summary>
|
||||
public int LiveTranslationDebounceIntervalMilliseconds { get; set; } = 1_000;
|
||||
public int LiveTranslationDebounceIntervalMilliseconds { get; set; } = 1_500;
|
||||
|
||||
/// <summary>
|
||||
/// Do we want to preselect any translator options?
|
||||
|
@ -1,4 +1,6 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using AIStudio.Provider;
|
||||
using AIStudio.Settings.DataModel;
|
||||
|
||||
@ -13,6 +15,12 @@ public sealed class SettingsManager
|
||||
{
|
||||
private const string SETTINGS_FILENAME = "settings.json";
|
||||
|
||||
private static readonly JsonSerializerOptions JSON_OPTIONS = new()
|
||||
{
|
||||
WriteIndented = true,
|
||||
Converters = { new JsonStringEnumConverter() },
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The directory where the configuration files are stored.
|
||||
/// </summary>
|
||||
@ -101,7 +109,7 @@ public sealed class SettingsManager
|
||||
return;
|
||||
|
||||
var settingsJson = await File.ReadAllTextAsync(settingsPath);
|
||||
var loadedConfiguration = JsonSerializer.Deserialize<Data>(settingsJson);
|
||||
var loadedConfiguration = JsonSerializer.Deserialize<Data>(settingsJson, JSON_OPTIONS);
|
||||
if(loadedConfiguration is null)
|
||||
return;
|
||||
|
||||
@ -120,7 +128,7 @@ public sealed class SettingsManager
|
||||
if(!Directory.Exists(ConfigDirectory))
|
||||
Directory.CreateDirectory(ConfigDirectory!);
|
||||
|
||||
var settingsJson = JsonSerializer.Serialize(this.ConfigurationData);
|
||||
var settingsJson = JsonSerializer.Serialize(this.ConfigurationData, JSON_OPTIONS);
|
||||
await File.WriteAllTextAsync(settingsPath, settingsJson);
|
||||
}
|
||||
|
||||
|
3
app/MindWork AI Studio/wwwroot/changelog/v0.8.6.md
Normal file
3
app/MindWork AI Studio/wwwroot/changelog/v0.8.6.md
Normal file
@ -0,0 +1,3 @@
|
||||
# v0.8.6, build 168
|
||||
- Improved the readability of the `settings.json` file by using indentation and enum names instead of numbers
|
||||
- Increased the default value for the live translation delay from 1,000 to 1,500 ms
|
Loading…
Reference in New Issue
Block a user