feat: 鏍囬鏍忕増鏈彿 + 搴旂敤甯傚満涓婃灦鏃ュ巻搴旂敤涓庡垎缁勬姌鍙?+ 鏃ョ▼鍐滃巻/琛ㄥ崟妯増浼樺寲 + 涓汉璧勬枡寮圭獥

This commit is contained in:
2026-08-23 08:55:08 +08:00
parent 62776aa33b
commit 66f107058e
22 changed files with 545 additions and 29 deletions
+3 -1
View File
@@ -54,7 +54,9 @@ export default function KeepAliveOutlet() {
const renderKeys = mountedKeys.includes(activeKey) ? mountedKeys : [...mountedKeys, activeKey];
// AI 对话页的助手 id 从路径解析(常驻后不再依赖 Route 的 useParams
const assistantId = activeKey === 'ai-chat' ? location.pathname.split('/')[2] : undefined;
// /ai-chat(无 id)时兜底默认助手 'assistant',与原 Navigate 重定向行为一致
const assistantId =
activeKey === 'ai-chat' ? location.pathname.split('/')[2] || 'assistant' : undefined;
const lastAssistantIdRef = useRef<string | undefined>(undefined);
if (assistantId) lastAssistantIdRef.current = assistantId;