Commit 8ca45a16 by Liu

fix:历史对话没有toolId及时清理缓存

parent b8758181
...@@ -26,6 +26,9 @@ export const HistoryBarList: React.FC<HistoryBarListProps> = ({ searchValue, onS ...@@ -26,6 +26,9 @@ export const HistoryBarList: React.FC<HistoryBarListProps> = ({ searchValue, onS
} }
// 直接导航到历史记录,不设置shouldSendQuestion // 直接导航到历史记录,不设置shouldSendQuestion
// 将 toolId 拼接到路由上,默认为空字符串 // 将 toolId 拼接到路由上,默认为空字符串
if (!conversation.toolId) {
sessionStorage.removeItem('currentToolId')
}
const toolId = conversation.toolId || '' const toolId = conversation.toolId || ''
const toolIdParam = `?toolId=${toolId}` const toolIdParam = `?toolId=${toolId}`
navigate(`/chat/${conversation.conversationId}${toolIdParam}`) navigate(`/chat/${conversation.conversationId}${toolIdParam}`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment