export type AppPath = | '/home' | '/agents' | '/skills' | '/cron' | '/scripts' | '/setting' | '/knowledge' | '/login'; export type WorkspacePath = Exclude; export type NavItem = { path: WorkspacePath; label: string; description: string; }; export const DEFAULT_PATH: WorkspacePath = '/home'; export const NAV_ITEMS: NavItem[] = [ { path: '/home', label: '首页', description: '对话与首页入口' }, { path: '/knowledge', label: '知识库', description: '知识库与内容管理' }, { path: '/agents', label: '模型', description: '智能体与提供方' }, { path: '/skills', label: '技能', description: '技能与能力集' }, { path: '/cron', label: '定时任务', description: '计划与调度' }, { path: '/scripts', label: '脚本', description: '脚本与自动化' }, { path: '/setting', label: '设置', description: '应用配置' }, ]; export function normalizeWorkspacePath(pathname: string): WorkspacePath { switch (pathname) { case '/knowledge': case '/agents': case '/skills': case '/cron': case '/scripts': case '/setting': return pathname; case '/home': default: return DEFAULT_PATH; } }