Expand description
Configuration loading, caching, and merging.
Provides the three public entry points consumed by the rest of the
ConfigurationProvider module:
read_and_parse_configuration_file- reads a singlesettings.jsonfrom disk via the asyncApplicationRunTime, with a 250 ms TTL parse cache to avoid redundant disk reads during burstInspectcalls.initialize_and_merge_configurations- rebuilds the mergedGlobalConfigurationby layering Default β User β Workspace in precedence order (deep-merge for nested objects, shallow for root keys).collect_default_configurations- walks every scanned extensionβscontributes.configuration.propertiesmap and extractsdefaultvalues, inserting them into a nested map keyed by dotted path.ClearSettingsFileCache- invalidates the parse cache; called byUpdateValueafter any write so the next read sees fresh content.
StructsΒ§
- Cached
Settings πValue
ConstantsΒ§
- SETTINGS_
FILE_ πCACHE_ TTL_ MS - Short TTL cache for parsed
settings.jsonreads. TheInspectConfigurationValuehandler reads BOTH the user settings.json and the workspace settings.json on every call; log audit20260501T053137shows ~57 Inspect calls per session = 114 disk reads of the same one or two files. With this cache, repeated reads withinTTL_MSreuse the parsedValueand a burst of Inspects collapses to ~1 disk read per file. TTL is short enough (250ms) that user edits to settings.json show up within a quarter-second.
FunctionsΒ§
- Clear
Settings File Cache - Drop every cached settings.json parse. Caller: any code path
that mutates settings (
UpdateConfigurationValue,initialize_and_merge_configurations). - Insert
Dotted πDefault - Insert a value into
targetat the dotted pathgit.enabled, creating intermediate object nodes as needed. Mirrorsinspect_configuration_valueβstry_foldtraversal so a lookup forgit.enabledfindstarget["git"]["enabled"]. - Settings
File πCache - collect_
default_ πconfigurations - Collects default configurations from all installed extensions.
- initialize_
and_ merge_ configurations - Logic to load and merge all configuration files into the effective
configuration stored in
ApplicationState. - read_
and_ πparse_ configuration_ file - An internal helper to read and parse a single JSON configuration file.