소스 검색

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])
   }, [stopChat, handleResponsing])
 
 
   const handleRestart = useCallback(() => {
   const handleRestart = useCallback(() => {
-    handleStop()
     connversationId.current = ''
     connversationId.current = ''
+    taskIdRef.current = ''
+    handleStop()
     const newChatList = config?.opening_statement
     const newChatList = config?.opening_statement
       ? [{
       ? [{
         id: `${Date.now()}`,
         id: `${Date.now()}`,