mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 11:02:17 +00:00
refactor(coding-agent): improve settings storage semantics and error handling
This commit is contained in:
parent
5133697bc4
commit
de2736bad0
7 changed files with 386 additions and 152 deletions
|
|
@ -700,6 +700,13 @@ Settings load from two locations and merge:
|
|||
|
||||
Project overrides global. Nested objects merge keys. Setters modify global settings by default.
|
||||
|
||||
**Persistence and error handling semantics:**
|
||||
|
||||
- Settings getters/setters are synchronous for in-memory state.
|
||||
- Setters enqueue persistence writes asynchronously.
|
||||
- Call `await settingsManager.flush()` when you need a durability boundary (for example, before process exit or before asserting file contents in tests).
|
||||
- `SettingsManager` does not print settings I/O errors. Use `settingsManager.drainErrors()` and report them in your app layer.
|
||||
|
||||
> See [examples/sdk/10-settings.ts](../examples/sdk/10-settings.ts)
|
||||
|
||||
## ResourceLoader
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue