mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: Make the agent dialog window exposed to the outside world fill in the begin form #3221 (#9124)
### What problem does this PR solve? Feat: Make the agent dialog window exposed to the outside world fill in the begin form #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -176,6 +176,7 @@ export function useSetUploadResponseData() {
|
||||
export const useSendAgentMessage = (
|
||||
url?: string,
|
||||
addEventList?: (data: IEventList, messageId: string) => void,
|
||||
beginParams?: any[],
|
||||
) => {
|
||||
const { id: agentId } = useParams();
|
||||
const { handleInputChange, value, setValue } = useHandleMessageInputChange();
|
||||
@ -226,7 +227,9 @@ export const useSendAgentMessage = (
|
||||
|
||||
params.query = message.content;
|
||||
// params.message_id = message.id;
|
||||
params.inputs = transferInputsArrayToObject(query); // begin operator inputs
|
||||
params.inputs = transferInputsArrayToObject(
|
||||
beginParams ? beginParams : query,
|
||||
); // begin operator inputs
|
||||
|
||||
params.files = uploadResponseList;
|
||||
|
||||
@ -248,13 +251,14 @@ export const useSendAgentMessage = (
|
||||
},
|
||||
[
|
||||
agentId,
|
||||
sessionId,
|
||||
send,
|
||||
clearUploadResponseList,
|
||||
inputs,
|
||||
beginParams,
|
||||
uploadResponseList,
|
||||
sessionId,
|
||||
setValue,
|
||||
removeLatestMessage,
|
||||
clearUploadResponseList,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user