mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
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:
@ -17,9 +17,6 @@ import {
|
||||
import { create } from 'zustand';
|
||||
import { devtools } from 'zustand/middleware';
|
||||
import { NodeData } from './interface';
|
||||
import { dsl } from './mock';
|
||||
|
||||
const { nodes: initialNodes, edges: initialEdges } = dsl.graph;
|
||||
|
||||
export type RFState = {
|
||||
nodes: Node<NodeData>[];
|
||||
@ -41,8 +38,8 @@ export type RFState = {
|
||||
// this is our useStore hook that we can use in our components to get parts of the store and call actions
|
||||
const useStore = create<RFState>()(
|
||||
devtools((set, get) => ({
|
||||
nodes: initialNodes as Node[],
|
||||
edges: initialEdges as Edge[],
|
||||
nodes: [] as Node[],
|
||||
edges: [] as Edge[],
|
||||
selectedNodeIds: [],
|
||||
selectedEdgeIds: [],
|
||||
onNodesChange: (changes: NodeChange[]) => {
|
||||
|
||||
Reference in New Issue
Block a user