import { useTranslate } from '@/hooks/commonHooks'; import { Flex } from 'antd'; import classNames from 'classnames'; import lowerFirst from 'lodash/lowerFirst'; import pick from 'lodash/pick'; import { Handle, NodeProps, Position } from 'reactflow'; import { Operator, operatorMap } from '../../constant'; import { NodeData } from '../../interface'; import OperatorIcon from '../../operator-icon'; import NodeDropdown from './dropdown'; import styles from './index.less'; import NodePopover from './popover'; const ZeroGapOperators = [Operator.RewriteQuestion, Operator.KeywordExtract]; export function RagNode({ id, data, isConnectable = true, selected, }: NodeProps) { const style = operatorMap[data.label as Operator]; const { t } = useTranslate('flow'); return (
x === data.label) ? 0 : 6} > {t(lowerFirst(data.label))} {' '}
{data.name}
); }