feat(autogpt_builder) Remove saving of execution data into sink node (#7383)

remove saving of execution data into sink node
This commit is contained in:
Aarushi
2024-07-12 00:44:11 +01:00
committed by GitHub
parent b89609fd16
commit 58af7f9466

View File

@@ -267,23 +267,6 @@ const FlowEditor: React.FC<{ flowID?: string; className?: string }> = ({
let inputData = getNestedData(blockSchema, node.data.hardcodedValues);
// Get data from connected nodes
const incomingEdges = allEdges.filter(edge => edge.target === node.id);
incomingEdges.forEach(edge => {
const sourceNode = allNodes.find(n => n.id === edge.source);
if (sourceNode && sourceNode.data.output_data) {
const outputKey = Object.keys(sourceNode.data.output_data)[0]; // Assuming single output
inputData[edge.targetHandle as string] = sourceNode.data.output_data[outputKey];
}
});
// Filter out any inputs that are not in the block's schema
Object.keys(inputData).forEach(key => {
if (!blockSchema.properties[key]) {
delete inputData[key];
}
});
console.log(`Final prepared input for ${node.data.blockType} (${node.id}):`, inputData);
return inputData;
};