feat: fetch flow (#1068)

### What problem does this PR solve?
feat: fetch flow #918 
feat: save graph

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-06-06 11:01:14 +08:00
committed by GitHub
parent b6980d8a16
commit 72c6784ff8
22 changed files with 241 additions and 90 deletions

View File

@ -1,4 +1,4 @@
import { Edge, Node } from 'reactflow';
import { FormInstance } from 'antd';
export interface DSLComponentList {
id: string;
@ -7,6 +7,7 @@ export interface DSLComponentList {
export interface IOperatorForm {
onValuesChange?(changedValues: any, values: any): void;
form?: FormInstance;
}
export interface IBeginForm {
@ -40,23 +41,3 @@ export type NodeData = {
color: string;
form: IBeginForm | IRetrievalForm | IGenerateForm;
};
export interface IFlow {
avatar: null;
canvas_type: null;
create_date: string;
create_time: number;
description: null;
dsl: {
answer: any[];
components: DSLComponentList;
graph: { nodes: Node[]; edges: Edge[] };
history: any[];
path: string[];
};
id: string;
title: string;
update_date: string;
update_time: number;
user_id: string;
}