Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix agent stop chat should not cancel the task (#17769)

Wang Qi61dd26323027
diff --git a/web/src/pages/agent/chat/use-send-agent-message.ts b/web/src/pages/agent/chat/use-send-agent-message.ts
index 6af27139e0..cc7624017b 100644
--- a/web/src/pages/agent/chat/use-send-agent-message.ts
+++ b/web/src/pages/agent/chat/use-send-agent-message.ts
@@ -36,7 +36,6 @@ import {
useIsTaskMode,
useSelectBeginNodeDataInputs,
} from '../hooks/use-get-begin-query';
-import { useStopMessage } from '../hooks/use-stop-message';
import { BeginQuery } from '../interface';
import useGraphStore from '../store';
import { receiveMessageError } from '../utils';
@@ -288,15 +287,9 @@ export const useSendAgentMessage = ({
const userId = searchParams.get('userId');
- const { stopMessage } = useStopMessage();
-
const stopConversation = useCallback(() => {
- const taskId = firstAnswer?.task_id;
stopOutputMessage();
- if (!isShared) {
- stopMessage(taskId);
- }
- }, [firstAnswer, isShared, stopMessage, stopOutputMessage]);
+ }, [stopOutputMessage]);
const sendMessage = useCallback(
async ({