Feat: Delete the operator node and hide the corresponding sheet #3221 (#9142)

### What problem does this PR solve?

Feat: Delete the operator node and hide the corresponding sheet #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-01 09:38:48 +08:00
committed by GitHub
parent 89c2067a16
commit 0aa160a990
8 changed files with 55 additions and 19 deletions

View File

@ -1,7 +1,7 @@
import { IconFont } from '@/components/icon-font';
import SvgIcon from '@/components/svg-icon';
import { cn } from '@/lib/utils';
import { CirclePlay } from 'lucide-react';
import { HousePlus } from 'lucide-react';
import { Operator } from './constant';
interface IProps {
@ -11,7 +11,7 @@ interface IProps {
export const OperatorIconMap = {
[Operator.Retrieval]: 'KR',
[Operator.Begin]: CirclePlay,
[Operator.Begin]: 'house-plus',
[Operator.Categorize]: 'a-QuestionClassification',
[Operator.Message]: 'reply',
[Operator.Iteration]: 'loop',
@ -49,6 +49,14 @@ const Empty = () => {
const OperatorIcon = ({ name, className }: IProps) => {
const Icon = OperatorIconMap[name as keyof typeof OperatorIconMap] || Empty;
if (name === Operator.Begin) {
return (
<div className="inline-block p-1 bg-background-checked rounded-sm">
<HousePlus className="rounded size-3" />
</div>
);
}
if (name in SVGIconMap) {
return (
<SvgIcon