feat: limit there to be only one line between two nodes #918 (#1310)

### What problem does this PR solve?

feat: limit there to be only one line between two nodes #918

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-06-28 12:01:06 +08:00
committed by GitHub
parent 0acf4194ca
commit 6a7c2112f7
3 changed files with 30 additions and 18 deletions

View File

@@ -16,11 +16,11 @@ import {
useHandleKeyUp,
useSelectCanvasData,
useShowDrawer,
useValidateConnection,
} from '../hooks';
import { RagNode } from './node';
import ChatDrawer from '../chat/drawer';
import { isValidConnection } from '../utils';
import styles from './index.less';
import { BeginNode } from './node/begin-node';
import { CategorizeNode } from './node/categorize-node';
@@ -49,6 +49,7 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
onNodesChange,
onSelectionChange,
} = useSelectCanvasData();
const isValidConnection = useValidateConnection();
const { drawerVisible, hideDrawer, showDrawer, clickedNode } =
useShowDrawer();