AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

fix(platform): Fix unexpected connection clash on two dynamic pins link with the same keys

Open majdyz opened this issue 1 year ago โ€ข 2 comments

Background

image

When you connect a dynamic input pin with the same key, both pins will always be treated identically.

The example above: output is connected to #key1, but the #key1 on the other non-connected block also loses its input field indicating it's also connected

Changes ๐Ÿ—๏ธ

Fix connection checking by adding nodeId into the equation.

Testing ๐Ÿ”

[!NOTE] Only for the new autogpt platform, currently in autogpt_platform/

  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

majdyz avatar Oct 03 '24 01:10 majdyz

PR Reviewer Guide ๐Ÿ”

Here are some key observations to aid the review process:

โฑ๏ธย Estimated effort to review: 2 ๐Ÿ”ต๐Ÿ”ตโšชโšชโšช
๐Ÿงชย No relevant tests
๐Ÿ”’ย No security concerns identified
โšกย Recommended focus areas for review

Unnecessary Console Log
A console.log statement has been added for debugging purposes and should be removed before merging.

Code Duplication
The isConnected function is implemented twice with similar logic. Consider refactoring to avoid duplication.

qodo-code-review[bot] avatar Oct 03 '24 01:10 qodo-code-review[bot]

Deploy Preview for auto-gpt-docs canceled.

Name Link
Latest commit 4ee44863a85447320c25f58b74ee411e659ba206
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67069e16759ec100080aca92

netlify[bot] avatar Oct 03 '24 01:10 netlify[bot]