Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

File subblock merge between basic and advanced.

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Jan 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 21, 2026 5:38am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 21, 2026

Greptile Summary

This PR adds a params transformer function to the A2A block configuration that properly merges the fileUpload (basic mode) and fileReference (advanced mode) subblock parameters into a single canonical files parameter.

  • Implemented params function in tools.config to handle canonical parameter merging
  • Uses precedence: fileUpload || fileReference to select the appropriate file source
  • Conditionally includes files in the output only when a value exists
  • Follows the same pattern used in other blocks like textract and mistral_parse

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is a straightforward bug fix that properly implements canonical parameter merging for file inputs. The implementation follows established patterns from other blocks in the codebase (textract, mistral_parse), uses safe destructuring and conditional spreading, and correctly handles the precedence between basic and advanced mode file inputs. The logic is simple, well-contained, and doesn't introduce any security concerns or breaking changes.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/a2a.ts Added params transformer to merge fileUpload and fileReference into canonical files parameter for basic/advanced mode support

Sequence Diagram

sequenceDiagram
    participant User
    participant Block as A2A Block
    participant Config as Block Config
    participant Tool as A2A Tool
    
    User->>Block: Set operation to a2a_send_message
    User->>Block: Choose basic/advanced mode
    
    alt Basic Mode
        User->>Block: Upload file via fileUpload
    else Advanced Mode
        User->>Block: Reference file via fileReference
    end
    
    Block->>Config: Pass params {fileUpload/fileReference, ...}
    Config->>Config: Extract fileUpload and fileReference
    Config->>Config: Merge: files = fileUpload || fileReference
    Config->>Tool: Send transformed params {...rest, files}
    Tool->>Tool: Process A2A request with files
    Tool-->>User: Return A2A response
Loading

cursor[bot]

This comment was marked as outdated.

@icecrasher321
Copy link
Collaborator Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@icecrasher321 icecrasher321 merged commit 0af96d0 into staging Jan 21, 2026
11 checks passed
waleedlatif1 added a commit that referenced this pull request Jan 21, 2026
* fix(google): wrap primitive tool responses for Gemini API compatibility (#2900)

* fix(canonical): copilot path + update parent (#2901)

* fix(rss): add top-level title, link, pubDate fields to RSS trigger output (#2902)

* fix(rss): add top-level title, link, pubDate fields to RSS trigger output

* fix(imap): add top-level fields to IMAP trigger output

* improvement(browseruse): add profile id param (#2903)

* improvement(browseruse): add profile id param

* make request a stub since we have directExec

* improvement(executor): upgraded abort controller to handle aborts for loops and parallels (#2880)

* improvement(executor): upgraded abort controller to handle aborts for loops and parallels

* comments

* improvement(files): update execution for passing base64 strings (#2906)

* progress

* improvement(execution): update execution for passing base64 strings

* fix types

* cleanup comments

* path security vuln

* reject promise correctly

* fix redirect case

* remove proxy routes

* fix tests

* use ipaddr

* feat(tools): added textract, added v2 for mistral, updated tag dropdown (#2904)

* feat(tools): added textract

* cleanup

* ack pr comments

* reorder

* removed upload for textract async version

* fix additional fields dropdown in editor, update parser to leave validation to be done on the server

* added mistral v2, files v2, and finalized textract

* updated the rest of the old file patterns, updated mistral outputs for v2

* updated tag dropdown to parse non-operation fields as well

* updated extension finder

* cleanup

* added description for inputs to workflow

* use helper for internal route check

* fix tag dropdown merge conflict change

* remove duplicate code

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(ui): change add inputs button to match output selector (#2907)

* fix(canvas): removed invite to workspace from canvas popover (#2908)

* fix(canvas): removed invite to workspace

* removed unused props

* fix(copilot): legacy tool display names (#2911)

* fix(a2a): canonical merge  (#2912)

* fix canonical merge

* fix empty array case

* fix(change-detection): copilot diffs have extra field (#2913)

* improvement(logs): improved logs ui bugs, added subflow disable UI (#2910)

* improvement(logs): improved logs ui bugs, added subflow disable UI

* added duplicate to action bar for subflows

* feat(broadcast): email v0.5 (#2905)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
@waleedlatif1 waleedlatif1 deleted the fix/a2a-block branch January 22, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants