From e84910b4235bee75ab864f9b7e1b9d614930e706 Mon Sep 17 00:00:00 2001 From: Zamil Majdy Date: Tue, 5 Nov 2024 12:43:07 +0700 Subject: [PATCH] fix(frontend): Fix connection value clash (#8559) --- .../frontend/src/components/node-input-components.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/autogpt_platform/frontend/src/components/node-input-components.tsx b/autogpt_platform/frontend/src/components/node-input-components.tsx index f22433759..da9969ebc 100644 --- a/autogpt_platform/frontend/src/components/node-input-components.tsx +++ b/autogpt_platform/frontend/src/components/node-input-components.tsx @@ -352,14 +352,9 @@ const NodeKeyValueInput: FC<{ const defaultEntries = new Map( Object.entries(entries ?? schema.default ?? {}), ); - const prefix = `${selfKey}_#_`; - connections - .filter((c) => c.targetHandle.startsWith(prefix)) - .map((c) => c.targetHandle.slice(prefix.length)) - .forEach((k) => !defaultEntries.has(k) && defaultEntries.set(k, "")); return Array.from(defaultEntries, ([key, value]) => ({ key, value })); - }, [connections, entries, schema.default, selfKey]); + }, [entries, schema.default]); const [keyValuePairs, setKeyValuePairs] = useState< { key: string; value: string | number | null }[]