Expand description
Settings: global settings.json merged with the trusted project’s.
Port of packages/coding-agent/src/core/settings-manager.ts in pi v1.0.0.
Each scope is an order-preserving document. Edits re-read its file under the
file’s lock, change it and write it back the way pi does. Readers use the
typed view of the merged document.
Structs§
- Settings
Manager - Both scopes and their merged view.
Enums§
- Scope
- Which file a setting lives in.
- Settings
Error - Settings errors.
Constants§
- TOML_
FILE - The TOML form of a folder’s settings file, which yapi reads and writes
in place of
settings.json.
Functions§
- apply_
http_ proxy - pi’s
applyHttpProxySettings: the globalhttpProxysetting stands in for unset proxy variables, for yapi and for chest alike. - http_
proxy - The global
httpProxysetting inagent_dir, when its settings file reads and sets one. - js_
string - JavaScript’s
String(value)for a JSON value. - read_
settings - The settings document in the
settings.jsonorsettings.tomlatpath, read as yapi reads it. A missing file is an empty document. - settings_
file - The settings file of folder
dir:settings.tomlwhen it holds one, elsesettings.json, which a first write creates. A folder that holds both is aSettingsError::Conflict.