mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-04 23:00:30 +08:00
Fix agent stop chat should not cancel the task (#17769)
This commit is contained in:
@@ -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 ({
|
||||
|
||||
Reference in New Issue
Block a user