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

This commit is contained in:
Wang Qi
2026-08-04 13:31:57 +08:00
committed by GitHub
parent d163689fb9
commit 61dd263230

View File

@@ -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 ({