INNER CODE UNIT · TypeScript
sanitizeAgentType
vibeeval/vibecosystem · hooks/src/agent-memory-loader.ts:38
function sanitizeAgentType(agentType: string): string {
return agentType.replace(/[:/\\]/g, '-').replace(/\s+/g, '-').toLowerCase();
}
/**
* Agent memory dizinini dondur
*/
function getAgentMemoryDir(agentType: string, scope: AgentMemoryScope): string {
const dirName = sanitizeAgentType(agentType);
switch (scope) {
case 'user':
return join(CLAUDE_HOME, 'agent-memory', dirName);
case 'project':
return join(process.cwd(), '.claude', 'agent-memory', dirName);
case 'local':
return join(process.cwd(), '.claude', 'agent-memory-local', dirName);
}
}