Update data handling in flowStore.ts

This commit is contained in:
anovazzi1 2024-04-19 11:05:45 -03:00
commit cd7a34bfad
3 changed files with 3 additions and 22 deletions

View file

@ -86,7 +86,7 @@ export default function IOFieldView({
value={
(flowPool[node.id] ?? [])[
(flowPool[node.id]?.length ?? 1) - 1
]?.params ?? ""
]?.data.results.result ?? ""
}
readOnly
/>
@ -103,7 +103,7 @@ export default function IOFieldView({
value={
(flowPool[node.id] ?? [])[
(flowPool[node.id]?.length ?? 1) - 1
]?.params ?? ""
]?.data.results.result ?? ""
}
readOnly
/>

View file

@ -159,7 +159,7 @@ export type VertexBuildTypeAPI = {
// data is the object received by the API
// it has results, artifacts, timedelta, duration
export type VertexDataTypeAPI = {
results: { [key: string]: { [key: string]: string } };
results: { [key: string]: string };
logs:{message:string}[];
messages: ChatOutputType[] | chatInputType[];
inactive?: boolean;

View file

@ -1122,25 +1122,6 @@ export function expandGroupNode(
setEdges(filteredEdges);
}
export function getGroupStatus(
flow: FlowType,
ssData: { [key: string]: { valid: boolean; params: string } }
) {
let status = { valid: true, params: SUCCESS_BUILD };
const { nodes } = flow.data!;
const ids = nodes.map((n: NodeType) => n.data.id);
ids.forEach((id) => {
if (!ssData[id]) {
status = ssData[id];
return;
}
if (!ssData[id].valid) {
status = { valid: false, params: ssData[id].params };
}
});
return status;
}
export function createFlowComponent(
nodeData: NodeDataType,
version: string