feat: Add a note node to the agent canvas #2767 (#2768)

### What problem does this PR solve?

feat: Add a note node to the agent canvas #2767

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
This commit is contained in:
balibabu
2024-10-09 19:39:04 +08:00
committed by GitHub
parent 7fc3bb3241
commit e904c134e7
49 changed files with 228 additions and 148 deletions

View File

@ -1,4 +1,3 @@
import { useTranslate } from '@/hooks/common-hooks';
import { Flex } from 'antd';
import classNames from 'classnames';
import pick from 'lodash/pick';
@ -10,12 +9,6 @@ import NodeDropdown from './dropdown';
import styles from './index.less';
import NodePopover from './popover';
const ZeroGapOperators = [
Operator.RewriteQuestion,
Operator.KeywordExtract,
Operator.ArXiv,
];
export function RagNode({
id,
data,
@ -23,7 +16,6 @@ export function RagNode({
selected,
}: NodeProps<NodeData>) {
const style = operatorMap[data.label as Operator];
const { t } = useTranslate('flow');
return (
<NodePopover nodeId={id}>
@ -51,12 +43,7 @@ export function RagNode({
id="b"
></Handle>
<Handle type="source" position={Position.Bottom} id="a" isConnectable />
<Flex
vertical
align="center"
justify={'space-around'}
// gap={ZeroGapOperators.some((x) => x === data.label) ? 0 : 6}
>
<Flex vertical align="center" justify={'space-around'}>
<Flex flex={1} justify="center" align="center">
<label htmlFor=""> </label>
</Flex>