Update data handling in flowStore.ts
This commit is contained in:
parent
39d8d479a1
commit
61a9693d00
1 changed files with 4 additions and 4 deletions
|
|
@ -88,12 +88,12 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
||||||
index = newFlowPool[nodeId].findIndex((flow) => flow.id === buildId);
|
index = newFlowPool[nodeId].findIndex((flow) => flow.id === buildId);
|
||||||
}
|
}
|
||||||
//check if the data is a flowpool object
|
//check if the data is a flowpool object
|
||||||
if ((data as FlowPoolObjectType).data?.artifacts !== undefined) {
|
if ((data as VertexBuildTypeAPI).valid !== undefined) {
|
||||||
newFlowPool[nodeId][index] = data as FlowPoolObjectType;
|
newFlowPool[nodeId][index] = data as VertexBuildTypeAPI;
|
||||||
}
|
}
|
||||||
//update data artifact
|
//update data results
|
||||||
else {
|
else {
|
||||||
newFlowPool[nodeId][index].data.artifacts = data;
|
newFlowPool[nodeId][index].data.messages[0] = (data as ChatOutputType| chatInputType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get().setFlowPool(newFlowPool);
|
get().setFlowPool(newFlowPool);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue