diff --git a/src/frontend/src/stores/flowStore.ts b/src/frontend/src/stores/flowStore.ts index 85c7ec60f..c993d87d0 100644 --- a/src/frontend/src/stores/flowStore.ts +++ b/src/frontend/src/stores/flowStore.ts @@ -36,6 +36,11 @@ const useFlowStore = create((set, get) => ({ isBuilt: false, reactFlowInstance: null, lastCopiedSelection: null, + flowPool: {}, + outputTypes: [], + inputTypes: [], + inputIds: [], + outputIds: [], setPending: (isPending) => { set({ isPending }); }, diff --git a/src/frontend/src/types/zustand/flow/index.ts b/src/frontend/src/types/zustand/flow/index.ts index 1555b82c2..20987704d 100644 --- a/src/frontend/src/types/zustand/flow/index.ts +++ b/src/frontend/src/types/zustand/flow/index.ts @@ -9,7 +9,34 @@ import { } from "reactflow"; import { FlowState } from "../../tabs"; +export type chatInputType = { + result: string; +}; + +export type ChatOutputType = { + message: string; + sender: string; + sender_name: string; +}; + +export type FlowPoolObjectType = { + timestamp: string; + valid: boolean; + params: any; + data: { artifacts: any; results: any | ChatOutputType | chatInputType }; + id: string; +}; + +export type FlowPoolType = { + [key: string]: Array; +}; + export type FlowStoreType = { + flowPool: FlowPoolType; + inputTypes: string[]; + outputTypes: string[]; + inputIds: string[]; + outputIds: string[]; updateSSEData: (sseData: object) => void; sseData: object; isBuilding: boolean;