MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / getMemoryPath

Function getMemoryPath

src/utils/config.ts:1791–1811  ·  view source on GitHub ↗
(memoryType: MemoryType)

Source from the content-addressed store, hash-verified

1789}
1790
1791export function getMemoryPath(memoryType: MemoryType): string {
1792 const cwd = getOriginalCwd()
1793
1794 switch (memoryType) {
1795 case 'User':
1796 return join(getClaudeConfigHomeDir(), 'CLAUDE.md')
1797 case 'Local':
1798 return join(cwd, 'CLAUDE.local.md')
1799 case 'Project':
1800 return join(cwd, 'CLAUDE.md')
1801 case 'Managed':
1802 return join(getManagedFilePath(), 'CLAUDE.md')
1803 case 'AutoMem':
1804 return getAutoMemEntrypoint()
1805 }
1806 // TeamMem is only a valid MemoryType when feature('TEAMMEM') is true
1807 if (feature('TEAMMEM')) {
1808 return teamMemPaths!.getTeamMemEntrypoint()
1809 }
1810 return '' // unreachable in external builds where TeamMem is not in MemoryType
1811}
1812
1813export function getManagedClaudeRulesDir(): string {
1814 return join(getManagedFilePath(), '.claude', 'rules')

Callers 4

claudemd.tsFile · 0.85

Calls 2

getOriginalCwdFunction · 0.85
getAutoMemEntrypointFunction · 0.85

Tested by

no test coverage detected