diff --git a/web/app/components/tools/tool-selector/index.tsx b/web/app/components/tools/tool-selector/index.tsx index 75b02698de..0b13ab9bc2 100644 --- a/web/app/components/tools/tool-selector/index.tsx +++ b/web/app/components/tools/tool-selector/index.tsx @@ -19,6 +19,7 @@ import { useAllBuiltInTools, useAllCustomTools, useAllWorkflowTools, + useInvalidateAllBuiltInTools, useUpdateProviderCredentials, } from '@/service/use-tools' import { CollectionType } from '@/app/components/tools/types' @@ -60,6 +61,7 @@ const ToolSelector: FC = ({ const { data: buildInTools } = useAllBuiltInTools() const { data: customTools } = useAllCustomTools() const { data: workflowTools } = useAllWorkflowTools() + const invalidateAllBuiltinTools = useInvalidateAllBuiltInTools() const currentProvider = useMemo(() => { const mergedTools = [...(buildInTools || []), ...(customTools || []), ...(workflowTools || [])] return mergedTools.find((toolWithProvider) => { @@ -80,6 +82,7 @@ const ToolSelector: FC = ({ const { isCurrentWorkspaceManager } = useAppContext() const [isShowSettingAuth, setShowSettingAuth] = useState(false) const handleCredentialSettingUpdate = () => { + invalidateAllBuiltinTools() Toast.notify({ type: 'success', message: t('common.api.actionSuccess'),