From bd80cd217ddda6a977e50f67874d01a1a0a50e99 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 28 Jan 2026 16:46:43 +0800 Subject: [PATCH] fix: no auth label text and default handle auth not back --- .../editor/skill-editor/plugins/tool-block/component.tsx | 6 ++++-- .../plugins/tool-block/tool-group-block-component.tsx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/component.tsx b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/component.tsx index 804bee0157..fbda9c99ec 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/component.tsx +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/component.tsx @@ -318,7 +318,9 @@ const ToolBlockComponent: FC = ({ })() const needAuthorization = useMemo(() => { - return !currentProvider?.is_team_authorization + if (!currentProvider) + return false + return !currentProvider.is_team_authorization }, [currentProvider]) const renderIcon = () => { @@ -529,7 +531,7 @@ const ToolBlockComponent: FC = ({ }} > {renderIcon()} - + {displayLabel} {needAuthorization && ( diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-group-block-component.tsx b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-group-block-component.tsx index fa0bf7180d..1f1eb3f2ae 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-group-block-component.tsx +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-group-block-component.tsx @@ -295,7 +295,9 @@ const ToolGroupBlockComponent: FC = ({ }, [currentTool, defaultToolValue, toolConfigFromMetadata]) const needAuthorization = useMemo(() => { - return !currentProvider?.is_team_authorization + if (!currentProvider) + return false + return !currentProvider.is_team_authorization }, [currentProvider]) const readmeEntrance = useMemo(() => { @@ -790,7 +792,7 @@ const ToolGroupBlockComponent: FC = ({ }} > {renderIcon()} - + {providerLabel} {needAuthorization