feat: 鏍囬鏍忕増鏈彿 + 搴旂敤甯傚満涓婃灦鏃ュ巻搴旂敤涓庡垎缁勬姌鍙?+ 鏃ョ▼鍐滃巻/琛ㄥ崟妯増浼樺寲 + 涓汉璧勬枡寮圭獥
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user