MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / getBaseDir

Function getBaseDir

src/services/SessionMemory/multiStore.ts:34–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32// changes CLAUDE_CONFIG_DIR mid-process still picks up the new dir.
33let _baseDirCache: { configDir: string; baseDir: string } | undefined
34function 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
45function getStoreDir(store: string): string {
46 return join(getBaseDir(), store)

Callers 3

getStoreDirFunction · 0.85
listStoresFunction · 0.85
listAllStoresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected