mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 08:06:48 +08:00
### What problem does this PR solve? Feat: Display the input parameters of begin in the output result table #3355 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -55,6 +55,7 @@ export const useSendNextMessage = () => {
|
||||
} = useSelectNextMessages();
|
||||
const { id: flowId } = useParams();
|
||||
const { handleInputChange, value, setValue } = useHandleMessageInputChange();
|
||||
const { refetch } = useFetchFlow();
|
||||
|
||||
const { send, answer, done } = useSendMessageWithSse(api.runCanvas);
|
||||
|
||||
@ -75,9 +76,11 @@ export const useSendNextMessage = () => {
|
||||
// cancel loading
|
||||
setValue(message.content);
|
||||
removeLatestMessage();
|
||||
} else {
|
||||
refetch(); // pull the message list after sending the message successfully
|
||||
}
|
||||
},
|
||||
[flowId, removeLatestMessage, setValue, send],
|
||||
[flowId, send, setValue, removeLatestMessage, refetch],
|
||||
);
|
||||
|
||||
const handleSendMessage = useCallback(
|
||||
@ -112,8 +115,10 @@ export const useSendNextMessage = () => {
|
||||
const sendRet = await send({ id: flowId });
|
||||
if (receiveMessageError(sendRet)) {
|
||||
message.error(sendRet?.data?.message);
|
||||
} else {
|
||||
refetch();
|
||||
}
|
||||
}, [flowId, send]);
|
||||
}, [flowId, refetch, send]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchPrologue();
|
||||
|
||||
Reference in New Issue
Block a user