Add flowPool, outputTypes, inputTypes, inputIds, and outputIds to FlowStoreType

This commit is contained in:
anovazzi1 2024-01-18 17:59:37 -03:00
commit fb30f18fc2
2 changed files with 32 additions and 0 deletions

View file

@ -36,6 +36,11 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
isBuilt: false,
reactFlowInstance: null,
lastCopiedSelection: null,
flowPool: {},
outputTypes: [],
inputTypes: [],
inputIds: [],
outputIds: [],
setPending: (isPending) => {
set({ isPending });
},

View file

@ -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<FlowPoolObjectType>;
};
export type FlowStoreType = {
flowPool: FlowPoolType;
inputTypes: string[];
outputTypes: string[];
inputIds: string[];
outputIds: string[];
updateSSEData: (sseData: object) => void;
sseData: object;
isBuilding: boolean;