Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
export function localizedDocument(relativePath: string, locale: 'en' | 'zh', pages: string[]): string {
const relative = relativePath.replace(/^(en|zh)\//, '');
const candidate = `${locale}/${relative}`;
const selected = /^(en|zh)\//.test(relativePath) && pages.includes(candidate)
? candidate : `${locale}/getting-started/01-introduction.md`;
return '/' + selected.replace(/index\.md$/, '').replace(/\.md$/, '');
}