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

@ -25,7 +25,7 @@ import { useDebounceEffect } from 'ahooks';
import { FormInstance } from 'antd';
import { humanId } from 'human-id';
import { useParams } from 'umi';
import { Operator } from './constant';
import { NodeMap, Operator } from './constant';
import useGraphStore, { RFState } from './store';
import { buildDslComponentsByGraph } from './utils';
@ -87,7 +87,7 @@ export const useHandleDrop = () => {
});
const newNode = {
id: `${type}:${humanId()}`,
type: 'ragNode',
type: NodeMap[type as Operator] || 'ragNode',
position: position || {
x: 0,
y: 0,