From f7016fd92218e30d4fccd3957a9d2332c89913e5 Mon Sep 17 00:00:00 2001 From: HyaCinth <88471803+HyaCiovo@users.noreply.github.com> Date: Fri, 1 Aug 2025 14:18:38 +0800 Subject: [PATCH] chore: Optimize component styles and interactions (#23250) (#23251) --- .../plugins/marketplace/empty/index.tsx | 2 +- .../block-selector/tool/action-item.tsx | 1 + .../nodes/agent/components/tool-icon.tsx | 56 ++++++++++--------- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/web/app/components/plugins/marketplace/empty/index.tsx b/web/app/components/plugins/marketplace/empty/index.tsx index 0306d5003d..a9cf125a15 100644 --- a/web/app/components/plugins/marketplace/empty/index.tsx +++ b/web/app/components/plugins/marketplace/empty/index.tsx @@ -28,7 +28,7 @@ const Empty = ({
11 && 'mb-0', lightCard && 'bg-background-default-lighter opacity-75', diff --git a/web/app/components/workflow/block-selector/tool/action-item.tsx b/web/app/components/workflow/block-selector/tool/action-item.tsx index e5e33614b0..4a2ed4a87b 100644 --- a/web/app/components/workflow/block-selector/tool/action-item.tsx +++ b/web/app/components/workflow/block-selector/tool/action-item.tsx @@ -34,6 +34,7 @@ const ToolItem: FC = ({ diff --git a/web/app/components/workflow/nodes/agent/components/tool-icon.tsx b/web/app/components/workflow/nodes/agent/components/tool-icon.tsx index 4ff0cd780d..8e6993a78d 100644 --- a/web/app/components/workflow/nodes/agent/components/tool-icon.tsx +++ b/web/app/components/workflow/nodes/agent/components/tool-icon.tsx @@ -61,37 +61,39 @@ export const ToolIcon = memo(({ providerName }: ToolIconProps) => { >
- {(() => { - if (iconFetchError || !icon) +
+ {(() => { + if (iconFetchError || !icon) + return + if (typeof icon === 'string') { + return tool icon setIconFetchError(true)} + /> + } + if (typeof icon === 'object') { + return + } return - if (typeof icon === 'string') { - return tool icon setIconFetchError(true)} - /> - } - if (typeof icon === 'object') { - return - } - return - })()} - {indicator && } + })()} +
+ {indicator && }
})