import classNames from 'classnames'; import { Handle, NodeProps, Position } from 'reactflow'; import OperateDropdown from '@/components/operate-dropdown'; import { Flex, Space } from 'antd'; import { useCallback } from 'react'; import { Operator, operatorMap } from '../../constant'; import OperatorIcon from '../../operator-icon'; import useGraphStore from '../../store'; import styles from './index.less'; export function RagNode({ id, data, isConnectable = true, selected, }: NodeProps<{ label: string }>) { const deleteNodeById = useGraphStore((store) => store.deleteNodeById); const deleteNode = useCallback(() => { deleteNodeById(id); }, [id, deleteNodeById]); return (
{/* */} {/* */} {data.label}
{operatorMap[data.label as Operator].description}
); }