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): Fix connection value clash (#8559)
Zamil Majdye84910b4235b
diff --git a/autogpt_platform/frontend/src/components/node-input-components.tsx b/autogpt_platform/frontend/src/components/node-input-components.tsxindex f224337596..da9969ebcf 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 }[]