feat: restrict classification operators cannot be connected to Answer and other classification #918 (#1294)

### What problem does this PR solve?

feat: restrict classification operators cannot be connected to Answer
and other classification #918

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-06-27 14:57:40 +08:00
committed by GitHub
parent 0ce720a247
commit fbb8cbfc67
9 changed files with 193 additions and 42 deletions

View File

@@ -20,9 +20,16 @@ import {
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';
const nodeTypes = { ragNode: RagNode };
const nodeTypes = {
ragNode: RagNode,
categorizeNode: CategorizeNode,
beginNode: BeginNode,
};
const edgeTypes = {
buttonEdge: ButtonEdge,
@@ -76,6 +83,7 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
onKeyUp={handleKeyUp}
onSelectionChange={onSelectionChange}
nodeOrigin={[0.5, 0]}
isValidConnection={isValidConnection}
onChange={(...params) => {
console.info('params:', ...params);
}}