* 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
()
| 177 | * the same pattern as hasSkipDangerousModePermissionPrompt() etc. |
| 178 | */ |
| 179 | function getAutoMemPathSetting(): string | undefined { |
| 180 | const dir = |
| 181 | getSettingsForSource('policySettings')?.autoMemoryDirectory ?? |
| 182 | getSettingsForSource('flagSettings')?.autoMemoryDirectory ?? |
| 183 | getSettingsForSource('localSettings')?.autoMemoryDirectory ?? |
| 184 | getSettingsForSource('userSettings')?.autoMemoryDirectory |
| 185 | return validateMemoryPath(dir, true) |
| 186 | } |
| 187 | |
| 188 | /** |
| 189 | * Check if CLAUDE_COWORK_MEMORY_PATH_OVERRIDE is set to a valid override. |
no test coverage detected