Commit 9fa0ba6e by Liu

fix:提问时toolId

parent 1ad0fc87
...@@ -220,7 +220,9 @@ export const Chat: React.FC = () => { ...@@ -220,7 +220,9 @@ export const Chat: React.FC = () => {
/** 提交问题 */ /** 提交问题 */
const handleSubmitQuestion = async (question: string, productCode?: string, toolId?: string) => { const handleSubmitQuestion = async (question: string, productCode?: string, toolId?: string) => {
const resolvedToolId = toolId ?? currentToolId ?? undefined // 优先读取缓存中的 toolId,再回退到传参或 Redux
const sessionToolId = sessionStorage.getItem('currentToolId') ?? undefined
const resolvedToolId = toolId ?? sessionToolId ?? currentToolId ?? undefined
// 停止之前的请求 // 停止之前的请求
if (abortControllerRef.current) { if (abortControllerRef.current) {
abortControllerRef.current.abort() abortControllerRef.current.abort()
......
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