mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 11:49:06 +00:00
Improved the save operation of settings by using a temporary file (#237)
This commit is contained in:
parent
8cbef49d89
commit
2131bf1817
@ -118,8 +118,10 @@ public sealed class SettingsManager(ILogger<SettingsManager> logger)
|
|||||||
}
|
}
|
||||||
|
|
||||||
var settingsJson = JsonSerializer.Serialize(this.ConfigurationData, JSON_OPTIONS);
|
var settingsJson = JsonSerializer.Serialize(this.ConfigurationData, JSON_OPTIONS);
|
||||||
await File.WriteAllTextAsync(settingsPath, settingsJson);
|
var tempFile = Path.GetTempFileName();
|
||||||
|
await File.WriteAllTextAsync(tempFile, settingsJson);
|
||||||
|
|
||||||
|
File.Move(tempFile, settingsPath, true);
|
||||||
this.logger.LogInformation("Stored the settings to the file system.");
|
this.logger.LogInformation("Stored the settings to the file system.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
- Added an ERI server coding assistant as a preview feature behind the RAG feature flag. This helps you implement an ERI server to gain access to, e.g., your enterprise data from within AI Studio.
|
- Added an ERI server coding assistant as a preview feature behind the RAG feature flag. This helps you implement an ERI server to gain access to, e.g., your enterprise data from within AI Studio.
|
||||||
- Improved provider requests by handling rate limits by retrying requests.
|
- Improved provider requests by handling rate limits by retrying requests.
|
||||||
- Improved the creation of the "the bias of the day" workspace; create that workspace only when the bias of the day feature is used.
|
- Improved the creation of the "the bias of the day" workspace; create that workspace only when the bias of the day feature is used.
|
||||||
|
- Improved the save operation of settings by using a temporary file to avoid data loss in rare cases.
|
||||||
- Fixed layout issues when selecting `other` items (e.g., programming languages).
|
- Fixed layout issues when selecting `other` items (e.g., programming languages).
|
||||||
- Fixed a bug about the bias of the day workspace when the workspace component was hidden.
|
- Fixed a bug about the bias of the day workspace when the workspace component was hidden.
|
Loading…
Reference in New Issue
Block a user