()
| 32 | // changes CLAUDE_CONFIG_DIR mid-process still picks up the new dir. |
| 33 | let _baseDirCache: { configDir: string; baseDir: string } | undefined |
| 34 | function getBaseDir(): string { |
| 35 | const configDir = |
| 36 | process.env['CLAUDE_CONFIG_DIR'] ?? join(homedir(), '.claude') |
| 37 | if (_baseDirCache && _baseDirCache.configDir === configDir) { |
| 38 | return _baseDirCache.baseDir |
| 39 | } |
| 40 | const baseDir = join(configDir, 'local-memory') |
| 41 | _baseDirCache = { configDir, baseDir } |
| 42 | return baseDir |
| 43 | } |
| 44 | |
| 45 | function getStoreDir(store: string): string { |
| 46 | return join(getBaseDir(), store) |
no outgoing calls
no test coverage detected