(memoryType: MemoryType)
| 1779 | } |
| 1780 | |
| 1781 | export 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 | |
| 1803 | export function getManagedClaudeRulesDir(): string { |
| 1804 | return join(getManagedFilePath(), '.claude', 'rules') |
no test coverage detected