@@ -71,9 +71,6 @@ public sealed class SettingsService : IDisposable
|
||||
_saveTimer.Tick += OnSaveTimerTick;
|
||||
}
|
||||
|
||||
/// <summary>The file being read. The agent's diagnostics report it.</summary>
|
||||
public string FilePath => _filePath;
|
||||
|
||||
/// <summary>
|
||||
/// Reads the settings from disk or returns the default values.
|
||||
/// </summary>
|
||||
@@ -154,8 +151,8 @@ public sealed class SettingsService : IDisposable
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The file is written beside its destination and moved onto it, which on one
|
||||
/// volume is a single step. That way a reader never meets a half-written file —
|
||||
/// and there is a reader, in another process, watching this very file.
|
||||
/// volume is a single step. That way the agent, which is told to re-read the moment
|
||||
/// this returns, never meets a half-written file.
|
||||
/// </remarks>
|
||||
public void Save()
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace CursorLang.Core.Services;
|
||||
/// <remarks>
|
||||
/// The message carries nothing but the fact. The temptation to send the changed values
|
||||
/// along has to be resisted: the file would stop being the only source of truth, and
|
||||
/// the two would part company the first time somebody edits it by hand. All this saves
|
||||
/// is the wait — the agent watches the file anyway and would notice on its own, just
|
||||
/// later and less predictably.
|
||||
/// the two would part company the first time somebody edits it by hand. Nothing else
|
||||
/// tells the agent — it does not watch the file — so a message that goes missing means
|
||||
/// settings it does not pick up until it is restarted.
|
||||
///
|
||||
/// Order is what makes it safe. The settings window writes the file whole, moves it
|
||||
/// into place in one step and only then signals, so by the time the agent reads there
|
||||
|
||||
Reference in New Issue
Block a user