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