Fix: The agent is embedded in the webpage; interrupting its operation will redirect to the login page. #12697 (#13224)

### What problem does this PR solve?

Fix: The agent is embedded in the webpage; interrupting its operation
will redirect to the login page. #12697

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2026-02-26 12:39:28 +08:00
committed by GitHub
parent 8bce212284
commit d2dd0b7e50

View File

@ -268,8 +268,10 @@ export const useSendAgentMessage = ({
const stopConversation = useCallback(() => {
const taskId = answerList.at(0)?.task_id;
stopOutputMessage();
stopMessage(taskId);
}, [answerList, stopMessage, stopOutputMessage]);
if (!isShared) {
stopMessage(taskId);
}
}, [answerList, isShared, stopMessage, stopOutputMessage]);
const sendMessage = useCallback(
async ({