Skip to content

Commit 0af96d0

Browse files
fix(a2a): canonical merge (#2912)
* fix canonical merge * fix empty array case
1 parent 1d45057 commit 0af96d0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/sim/blocks/blocks/a2a.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,15 @@ export const A2ABlock: BlockConfig<A2AResponse> = {
214214
],
215215
config: {
216216
tool: (params) => params.operation as string,
217+
params: (params) => {
218+
const { fileUpload, fileReference, ...rest } = params
219+
const hasFileUpload = Array.isArray(fileUpload) ? fileUpload.length > 0 : !!fileUpload
220+
const files = hasFileUpload ? fileUpload : fileReference
221+
return {
222+
...rest,
223+
...(files ? { files } : {}),
224+
}
225+
},
217226
},
218227
},
219228
inputs: {

0 commit comments

Comments
 (0)