From 61a9693d00668e246dd5d12e9a1add4f7157228a Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Fri, 19 Apr 2024 10:57:52 -0300 Subject: [PATCH] Update data handling in flowStore.ts --- src/frontend/src/stores/flowStore.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/stores/flowStore.ts b/src/frontend/src/stores/flowStore.ts index c01ec1bb3..4d70cc882 100644 --- a/src/frontend/src/stores/flowStore.ts +++ b/src/frontend/src/stores/flowStore.ts @@ -88,12 +88,12 @@ const useFlowStore = create((set, get) => ({ index = newFlowPool[nodeId].findIndex((flow) => flow.id === buildId); } //check if the data is a flowpool object - if ((data as FlowPoolObjectType).data?.artifacts !== undefined) { - newFlowPool[nodeId][index] = data as FlowPoolObjectType; + if ((data as VertexBuildTypeAPI).valid !== undefined) { + newFlowPool[nodeId][index] = data as VertexBuildTypeAPI; } - //update data artifact + //update data results else { - newFlowPool[nodeId][index].data.artifacts = data; + newFlowPool[nodeId][index].data.messages[0] = (data as ChatOutputType| chatInputType); } } get().setFlowPool(newFlowPool);