feat: add arxiv operator #918 (#1683)

### What problem does this PR solve?

feat: add arxiv operator #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-07-24 11:36:23 +08:00
committed by GitHub
parent 4b195cc14c
commit 7e60800c95
12 changed files with 115 additions and 5 deletions

View File

@@ -7,9 +7,10 @@ import useGraphStore from '../../store';
interface IProps {
id: string;
iconFontColor?: string;
}
const NodeDropdown = ({ id }: IProps) => {
const NodeDropdown = ({ id, iconFontColor }: IProps) => {
const { t } = useTranslation();
const deleteNodeById = useGraphStore((store) => store.deleteNodeById);
const duplicateNodeById = useGraphStore((store) => store.duplicateNode);
@@ -42,6 +43,7 @@ const NodeDropdown = ({ id }: IProps) => {
deleteItem={deleteNode}
items={items}
needsDeletionValidation={false}
iconFontColor={iconFontColor}
></OperateDropdown>
);
};

View File

@@ -11,7 +11,11 @@ import NodeDropdown from './dropdown';
import styles from './index.less';
import NodePopover from './popover';
const ZeroGapOperators = [Operator.RewriteQuestion, Operator.KeywordExtract];
const ZeroGapOperators = [
Operator.RewriteQuestion,
Operator.KeywordExtract,
Operator.Arxiv,
];
export function RagNode({
id,
@@ -69,8 +73,10 @@ export function RagNode({
</span>
</Flex>
<Flex flex={1}>
{' '}
<NodeDropdown id={id}></NodeDropdown>
<NodeDropdown
id={id}
iconFontColor={style?.moreIconColor}
></NodeDropdown>
</Flex>
</Flex>