MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getAutoMemPathSetting

Function getAutoMemPathSetting

source code/memdir/paths.ts:181–188  ·  view source on GitHub ↗

* Settings.json override for the full auto-memory directory path. * Supports ~/ expansion for user convenience. * * SECURITY: projectSettings (.claude/settings.json committed to the repo) is * intentionally excluded — a malicious repo could otherwise set * autoMemoryDirectory: "~/.ssh" and gain

()

Source from the content-addressed store, hash-verified

179 * the same pattern as hasSkipDangerousModePermissionPrompt() etc.
180 */
181function getAutoMemPathSetting(): string | undefined {
182 const dir =
183 getSettingsForSource('policySettings')?.autoMemoryDirectory ??
184 getSettingsForSource('flagSettings')?.autoMemoryDirectory ??
185 getSettingsForSource('localSettings')?.autoMemoryDirectory ??
186 getSettingsForSource('userSettings')?.autoMemoryDirectory
187 return validateMemoryPath(dir, true)
188}
189
190/**
191 * Check if CLAUDE_COWORK_MEMORY_PATH_OVERRIDE is set to a valid override.

Callers 1

paths.tsFile · 0.85

Calls 2

getSettingsForSourceFunction · 0.85
validateMemoryPathFunction · 0.85

Tested by

no test coverage detected