From c75afdb3218336fe03d9d4de68731516b75a10b1 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 26 Jan 2026 11:13:24 +0800 Subject: [PATCH] chore: no auth no choose show tools --- .../sections/tool-authorization-section.tsx | 5 +- .../plugins/tool-block/component.tsx | 2 +- .../tool-block/tool-group-block-component.tsx | 103 +++++++++--------- 3 files changed, 58 insertions(+), 52 deletions(-) diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/sections/tool-authorization-section.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/sections/tool-authorization-section.tsx index 83208c4177..aeaab04cf6 100644 --- a/web/app/components/plugins/plugin-detail-panel/tool-selector/sections/tool-authorization-section.tsx +++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/sections/tool-authorization-section.tsx @@ -14,19 +14,22 @@ type ToolAuthorizationSectionProps = { currentProvider?: ToolWithProvider credentialId?: string onAuthorizationItemClick?: (id: string) => void + noDivider?: boolean } const ToolAuthorizationSection: FC = ({ currentProvider, credentialId, onAuthorizationItemClick, + noDivider, }) => { if (!currentProvider || currentProvider.type !== CollectionType.builtIn || !currentProvider.allow_delete) return null return ( <> - + {!noDivider + && }
= ({ const readmeEntrance = useMemo(() => { if (!currentProvider) return null - return + return }, [currentProvider]) const toolSettingsContent = currentProvider && currentTool && toolValue && ( 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 c996cacceb..6fcea847f4 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 @@ -292,7 +292,7 @@ const ToolGroupBlockComponent: FC = ({ const readmeEntrance = useMemo(() => { if (!currentProvider) return null - return + return }, [currentProvider]) useEffect(() => { @@ -589,6 +589,7 @@ const ToolGroupBlockComponent: FC = ({ onAuthorizationItemClick={(id) => { setToolValue(prev => (prev ? { ...prev, credential_id: id } : prev)) }} + noDivider /> {needAuthorization && (
@@ -598,57 +599,59 @@ const ToolGroupBlockComponent: FC = ({
)}
-
-
- {t('toolGroup.actionsEnabled', { ns: 'workflow', num: displayEnabledCount })} -
-
- {toolItems.map(item => ( -
-
-
- {item.toolLabel} -
- {item.toolParams?.length - ? ( - - ) - : null} -
- { - handleToggleTool(item.configId, value) - }} - /> + {!needAuthorization && ( +
+
+ {t('toolGroup.actionsEnabled', { ns: 'workflow', num: displayEnabledCount })} +
+
+ {toolItems.map(item => ( +
+
+
+ {item.toolLabel} +
+ {item.toolParams?.length + ? ( + + ) + : null} +
+ { + handleToggleTool(item.configId, value) + }} + /> +
+ {item.toolDescription && ( +
+ {item.toolDescription} +
+ )} + {expandedToolId === item.configId && toolSettingsContent}
- {item.toolDescription && ( -
- {item.toolDescription} -
- )} - {expandedToolId === item.configId && toolSettingsContent} -
- ))} + ))} +
-
+ )} {readmeEntrance}
) @@ -658,7 +661,7 @@ const ToolGroupBlockComponent: FC = ({