MCPcopy Create free account
hub / github.com/Noumena-Network/code / getSettingsWithSources

Function getSettingsWithSources

src/utils/settings/settings.ts:923–935  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

921 * and `sources` are consistent even if the change detector hasn't fired yet.
922 */
923export function getSettingsWithSources(): SettingsWithSources {
924 // Reset both caches so getSettingsForSource (per-source cache) and
925 // getInitialSettings (session cache) agree on the current disk state.
926 resetSettingsCache()
927 const sources: SettingsWithSources['sources'] = []
928 for (const source of getEnabledSettingSources()) {
929 const settings = getSettingsForSource(source)
930 if (settings && Object.keys(settings).length > 0) {
931 sources.push({ source, settings })
932 }
933 }
934 return { effective: getInitialSettings(), sources }
935}
936
937/**
938 * Get merged settings and validation errors from all sources

Callers 1

runHeadlessStreamingFunction · 0.85

Calls 5

resetSettingsCacheFunction · 0.85
getEnabledSettingSourcesFunction · 0.85
getSettingsForSourceFunction · 0.85
keysMethod · 0.80
getInitialSettingsFunction · 0.70

Tested by

no test coverage detected