diff --git a/web/app/components/workflow/block-selector/all-tools.tsx b/web/app/components/workflow/block-selector/all-tools.tsx index bde5390cd7..627f790c54 100644 --- a/web/app/components/workflow/block-selector/all-tools.tsx +++ b/web/app/components/workflow/block-selector/all-tools.tsx @@ -53,6 +53,7 @@ type AllToolsProps = { featuredLoading?: boolean showFeatured?: boolean onFeaturedInstallSuccess?: () => Promise | void + hideFeaturedTool?: boolean } const DEFAULT_TAGS: AllToolsProps['tags'] = [] @@ -76,6 +77,7 @@ const AllTools = ({ featuredLoading = false, showFeatured = false, onFeaturedInstallSuccess, + hideFeaturedTool = false, }: AllToolsProps) => { const { t } = useTranslation() const language = useGetLanguage() @@ -194,6 +196,7 @@ const AllTools = ({ && !isInRAGPipeline && activeTab === ToolTypeEnum.All && !hasFilter + && !hideFeaturedTool const shouldShowMarketplaceFooter = enable_marketplace && !hasFilter const handleRAGSelect = useCallback((type, pluginDefaultValue) => { @@ -259,9 +262,11 @@ const AllTools = ({ )} {hasToolsListContent && ( <> -
- {t('allTools', { ns: 'tools' })} -
+ {!hideFeaturedTool && ( +
+ {t('allTools', { ns: 'tools' })} +
+ )} = ({ @@ -69,6 +70,7 @@ const ToolPicker: FC = ({ selectedTools, panelClassName, preventFocusLoss = false, + hideFeaturedTool = false, }) => { const { t } = useTranslation() const [searchText, setSearchText] = useState('') @@ -215,6 +217,7 @@ const ToolPicker: FC = ({ featuredPlugins={featuredPlugins} featuredLoading={isFeaturedLoading} showFeatured={scope === 'all' && enable_marketplace} + hideFeaturedTool={hideFeaturedTool} onFeaturedInstallSuccess={async () => { invalidateBuiltInTools() invalidateCustomTools() diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-picker-block.tsx b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-picker-block.tsx index 8092fe9f0e..454fa2ce0f 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-picker-block.tsx +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-picker-block.tsx @@ -150,6 +150,7 @@ const ToolPickerBlock: FC = ({ scope = 'all' }) => { closeMenu() }} scope={scope} + hideFeaturedTool preventFocusLoss />, anchorElementRef.current,