MCPcopy Create free account
hub / github.com/HELPMEEADICE/doge-code / getMemoryPath

Function getMemoryPath

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

Source from the content-addressed store, hash-verified

1814}
1815
1816export function getMemoryPath(memoryType: MemoryType): string {
1817 const cwd = getOriginalCwd()
1818
1819 switch (memoryType) {
1820 case 'User':
1821 return join(getClaudeConfigHomeDir(), 'CLAUDE.md')
1822 case 'Local':
1823 return join(cwd, 'CLAUDE.local.md')
1824 case 'Project':
1825 return join(cwd, 'CLAUDE.md')
1826 case 'Managed':
1827 return join(getManagedFilePath(), 'CLAUDE.md')
1828 case 'AutoMem':
1829 return getAutoMemEntrypoint()
1830 }
1831 // TeamMem is only a valid MemoryType when feature('TEAMMEM') is true
1832 if (feature('TEAMMEM')) {
1833 return teamMemPaths!.getTeamMemEntrypoint()
1834 }
1835 return '' // unreachable in external builds where TeamMem is not in MemoryType
1836}
1837
1838export function getManagedClaudeRulesDir(): string {
1839 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