feat: add icon to graph nodes #918 (#1117)

### What problem does this PR solve?

feat: add icon to graph nodes #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-06-11 18:01:19 +08:00
committed by GitHub
parent 8902d92d0e
commit ff5ea266d2
8 changed files with 91 additions and 46 deletions

View File

@ -2,6 +2,7 @@ import {
MergeCellsOutlined,
RocketOutlined,
SendOutlined,
SlidersOutlined,
} from '@ant-design/icons';
export enum Operator {
@ -11,10 +12,26 @@ export enum Operator {
Answer = 'Answer',
}
export const operatorIconMap = {
[Operator.Retrieval]: RocketOutlined,
[Operator.Generate]: MergeCellsOutlined,
[Operator.Answer]: SendOutlined,
[Operator.Begin]: SlidersOutlined,
};
export const componentList = [
{ name: Operator.Retrieval, icon: <RocketOutlined />, description: '' },
{ name: Operator.Generate, icon: <MergeCellsOutlined />, description: '' },
{ name: Operator.Answer, icon: <SendOutlined />, description: '' },
{
name: Operator.Retrieval,
description: '',
},
{
name: Operator.Generate,
description: '',
},
{
name: Operator.Answer,
description: '',
},
];
export const initialRetrievalValues = {