MCPcopy
hub / github.com/codeaashu/claude-code / loadSettings

Function loadSettings

src/services/remoteManagedSettings/syncCacheState.ts:57–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55// sync IO — settings pipeline is sync. fileRead and jsonRead are leaves;
56// file.ts and json.ts both sit in the settings SCC.
57function loadSettings(): SettingsJson | null {
58 try {
59 const content = readFileSync(getSettingsPath())
60 const data: unknown = jsonParse(stripBOM(content))
61 if (!data || typeof data !== 'object' || Array.isArray(data)) {
62 return null
63 }
64 return data as SettingsJson
65 } catch {
66 return null
67 }
68}
69
70export function getRemoteManagedSettingsSyncFromCache(): SettingsJson | null {
71 if (eligible !== true) return null

Callers 1

Calls 4

stripBOMFunction · 0.90
getSettingsPathFunction · 0.85
jsonParseFunction · 0.85
readFileSyncFunction · 0.50

Tested by

no test coverage detected