From 6a56649be2f41340857f5779404aa8ed11638e78 Mon Sep 17 00:00:00 2001 From: twwu Date: Wed, 27 Aug 2025 18:09:48 +0800 Subject: [PATCH] feat(web): add support for Tool block type in BlockIcon component --- web/app/components/workflow/block-icon.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/block-icon.tsx b/web/app/components/workflow/block-icon.tsx index 96eb2c2b5b..60fa813cd9 100644 --- a/web/app/components/workflow/block-icon.tsx +++ b/web/app/components/workflow/block-icon.tsx @@ -84,6 +84,7 @@ const ICON_CONTAINER_BG_COLOR_MAP: Record = { [BlockEnum.TemplateTransform]: 'bg-util-colors-blue-blue-500', [BlockEnum.VariableAssigner]: 'bg-util-colors-blue-blue-500', [BlockEnum.VariableAggregator]: 'bg-util-colors-blue-blue-500', + [BlockEnum.Tool]: 'bg-util-colors-blue-blue-500', [BlockEnum.Assigner]: 'bg-util-colors-blue-blue-500', [BlockEnum.ParameterExtractor]: 'bg-util-colors-blue-blue-500', [BlockEnum.DocExtractor]: 'bg-util-colors-green-green-500', @@ -99,19 +100,20 @@ const BlockIcon: FC = ({ toolIcon, }) => { const isToolOrDataSource = type === BlockEnum.Tool || type === BlockEnum.DataSource + const showDefaultIcon = !isToolOrDataSource || !toolIcon return (
{ - !isToolOrDataSource && ( + showDefaultIcon && ( getIcon(type, size === 'xs' ? 'w-3 h-3' : 'w-3.5 h-3.5') ) }