From fd1ad184895682056ddc42fb97e45d3704f6d26b Mon Sep 17 00:00:00 2001 From: balibabu Date: Mon, 27 Oct 2025 17:04:32 +0800 Subject: [PATCH] Feat: Adjust the style of the toolbar at the bottom of the agent canvas #10703 (#10807) ### What problem does this PR solve? Feat: Adjust the style of the toolbar at the bottom of the agent canvas #10703 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/pages/agent/canvas/edge/index.tsx | 4 +- web/src/pages/agent/canvas/index.tsx | 6 ++- .../node/dropdown/accordion-operators.tsx | 46 ++++++++++--------- .../node/dropdown/operator-item-list.tsx | 6 ++- 4 files changed, 38 insertions(+), 24 deletions(-) diff --git a/web/src/pages/agent/canvas/edge/index.tsx b/web/src/pages/agent/canvas/edge/index.tsx index f1a714d5b..6385ada2a 100644 --- a/web/src/pages/agent/canvas/edge/index.tsx +++ b/web/src/pages/agent/canvas/edge/index.tsx @@ -93,7 +93,9 @@ function InnerButtonEdge({ }, [data?.isHovered, isTargetPlaceholder, sourceHandleId, target]); const activeMarkerEnd = - selected || !isEmpty(showHighlight) ? 'url(#selected-marker)' : markerEnd; + selected || !isEmpty(showHighlight) || isTargetPlaceholder + ? 'url(#selected-marker)' + : markerEnd; return ( <> diff --git a/web/src/pages/agent/canvas/index.tsx b/web/src/pages/agent/canvas/index.tsx index c68b40c1a..8cff4b7ae 100644 --- a/web/src/pages/agent/canvas/index.tsx +++ b/web/src/pages/agent/canvas/index.tsx @@ -311,7 +311,11 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) { > - + diff --git a/web/src/pages/agent/canvas/node/dropdown/accordion-operators.tsx b/web/src/pages/agent/canvas/node/dropdown/accordion-operators.tsx index 3ea40f986..f26328bbd 100644 --- a/web/src/pages/agent/canvas/node/dropdown/accordion-operators.tsx +++ b/web/src/pages/agent/canvas/node/dropdown/accordion-operators.tsx @@ -6,10 +6,18 @@ import { } from '@/components/ui/accordion'; import { Operator } from '@/constants/agent'; import useGraphStore from '@/pages/agent/store'; -import { useCallback, useMemo } from 'react'; +import { PropsWithChildren, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { OperatorItemList } from './operator-item-list'; +function OperatorAccordionTrigger({ children }: PropsWithChildren) { + return ( + + {children} + + ); +} + export function AccordionOperators({ isCustomDropdown = false, mousePosition, @@ -26,10 +34,10 @@ export function AccordionOperators({ defaultValue={['item-1', 'item-2', 'item-3', 'item-4', 'item-5']} > - + {t('flow.foundation')} - - + + - - {t('flow.dialog')} - - + {t('flow.dialog')} + - - {t('flow.flow')} - - + {t('flow.flow')} + - + {t('flow.dataManipulation')} - - + + - - {t('flow.tools')} - - + {t('flow.tools')} + - Chunker - + + Chunker + + {operators.map(renderOperatorItem)}; + return ( +
    + {operators.map(renderOperatorItem)} +
+ ); }