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:
balibabu
2025-07-31 09:34:45 +08:00
committed by GitHub
parent d9fe279dde
commit 6a170b2f6e
12 changed files with 141 additions and 32 deletions

View File

@ -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,
],
);