Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(frontend/builder): include handles in connect_nodes dedup key

Zamil Majdy77f41d0cc656
diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderChatPanel/BuilderChatPanel.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderChatPanel/BuilderChatPanel.tsx
index 2f6d72c86d..ed1510756d 100644
--- a/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderChatPanel/BuilderChatPanel.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderChatPanel/BuilderChatPanel.tsx
@@ -187,7 +187,7 @@ function MessageList({
const key =
action.type === "update_node_input"
? `${action.nodeId}:${action.key}`
- : `${action.source}->${action.target}`;
+ : `${action.source}:${action.sourceHandle}->${action.target}:${action.targetHandle}`;
return (
<ActionItem
key={key}
diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderChatPanel/useBuilderChatPanel.ts b/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderChatPanel/useBuilderChatPanel.ts
index f74db858ce..ea81b6b5dc 100644
--- a/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderChatPanel/useBuilderChatPanel.ts
+++ b/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderChatPanel/useBuilderChatPanel.ts
@@ -149,7 +149,7 @@ export function useBuilderChatPanel({
const key =
action.type === "update_node_input"
? `${action.nodeId}:${action.key}`
- : `${action.source}->${action.target}`;
+ : `${action.source}:${action.sourceHandle}->${action.target}:${action.targetHandle}`;
if (seen.has(key)) return false;
seen.add(key);
return true;