mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Interrupt streaming #6515 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -375,6 +375,10 @@ export const useSendNextMessage = (controller: AbortController) => {
|
||||
const { setConversationIsNew, getConversationIsNew } =
|
||||
useSetChatRouteParams();
|
||||
|
||||
const stopOutputMessage = useCallback(() => {
|
||||
controller.abort();
|
||||
}, [controller]);
|
||||
|
||||
const sendMessage = useCallback(
|
||||
async ({
|
||||
message,
|
||||
@ -490,6 +494,7 @@ export const useSendNextMessage = (controller: AbortController) => {
|
||||
ref,
|
||||
derivedMessages,
|
||||
removeMessageById,
|
||||
stopOutputMessage,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user