瀏覽代碼

fix: chat restart (#2488)

zxhlyh 1 年之前
父節點
當前提交
eedbe1b770
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      web/app/components/base/chat/chat/hooks.ts

+ 2 - 1
web/app/components/base/chat/chat/hooks.ts

@@ -146,8 +146,9 @@ export const useChat = (
   }, [stopChat, handleResponsing])
 
   const handleRestart = useCallback(() => {
-    handleStop()
     connversationId.current = ''
+    taskIdRef.current = ''
+    handleStop()
     const newChatList = config?.opening_statement
       ? [{
         id: `${Date.now()}`,