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

Function getMemoryPath

source code/utils/config.ts:1781–1801  ·  view source on GitHub ↗
(memoryType: MemoryType)

Source from the content-addressed store, hash-verified

1779}
1780
1781export function getMemoryPath(memoryType: MemoryType): string {
1782 const cwd = getOriginalCwd()
1783
1784 switch (memoryType) {
1785 case 'User':
1786 return join(getClaudeConfigHomeDir(), 'CLAUDE.md')
1787 case 'Local':
1788 return join(cwd, 'CLAUDE.local.md')
1789 case 'Project':
1790 return join(cwd, 'CLAUDE.md')
1791 case 'Managed':
1792 return join(getManagedFilePath(), 'CLAUDE.md')
1793 case 'AutoMem':
1794 return getAutoMemEntrypoint()
1795 }
1796 // TeamMem is only a valid MemoryType when feature('TEAMMEM') is true
1797 if (feature('TEAMMEM')) {
1798 return teamMemPaths!.getTeamMemEntrypoint()
1799 }
1800 return '' // unreachable in external builds where TeamMem is not in MemoryType
1801}
1802
1803export function getManagedClaudeRulesDir(): string {
1804 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