Add flowPool, outputTypes, inputTypes, inputIds, and outputIds to FlowStoreType
This commit is contained in:
parent
b8fab10f0b
commit
fb30f18fc2
2 changed files with 32 additions and 0 deletions
|
|
@ -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 });
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue