(memoryType: MemoryType)
| 1789 | } |
| 1790 | |
| 1791 | export 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 | |
| 1813 | export function getManagedClaudeRulesDir(): string { |
| 1814 | return join(getManagedFilePath(), '.claude', 'rules') |
no test coverage detected