diff --git a/web/app/components/app/create-app-dialog/app-list/index.tsx b/web/app/components/app/create-app-dialog/app-list/index.tsx index f158f21d99..a545774f2c 100644 --- a/web/app/components/app/create-app-dialog/app-list/index.tsx +++ b/web/app/components/app/create-app-dialog/app-list/index.tsx @@ -27,6 +27,7 @@ import { getRedirection } from '@/utils/app-redirection' import Input from '@/app/components/base/input' import type { AppMode } from '@/types/app' import { DSLImportMode } from '@/models/app' +import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks' type AppsProps = { onSuccess?: () => void @@ -119,6 +120,7 @@ const Apps = ({ const [currApp, setCurrApp] = React.useState(null) const [isShowCreateModal, setIsShowCreateModal] = React.useState(false) + const { handleCheckPluginDependencies } = usePluginDependencies() const onCreate: CreateAppModalProps['onConfirm'] = async ({ name, icon_type, @@ -146,6 +148,8 @@ const Apps = ({ }) if (onSuccess) onSuccess() + if (app.app_id) + await handleCheckPluginDependencies(app.app_id) localStorage.setItem(NEED_REFRESH_APP_LIST_KEY, '1') getRedirection(isCurrentWorkspaceEditor, { id: app.app_id }, push) } diff --git a/web/app/components/explore/app-list/index.tsx b/web/app/components/explore/app-list/index.tsx index b8e7939328..458aadcb61 100644 --- a/web/app/components/explore/app-list/index.tsx +++ b/web/app/components/explore/app-list/index.tsx @@ -25,6 +25,7 @@ import { useAppContext } from '@/context/app-context' import { getRedirection } from '@/utils/app-redirection' import Input from '@/app/components/base/input' import { DSLImportMode } from '@/models/app' +import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks' type AppsProps = { pageType?: PageType @@ -117,6 +118,7 @@ const Apps = ({ const [currApp, setCurrApp] = React.useState(null) const [isShowCreateModal, setIsShowCreateModal] = React.useState(false) + const { handleCheckPluginDependencies } = usePluginDependencies() const onCreate: CreateAppModalProps['onConfirm'] = async ({ name, icon_type, @@ -144,6 +146,8 @@ const Apps = ({ }) if (onSuccess) onSuccess() + if (app.app_id) + await handleCheckPluginDependencies(app.app_id) localStorage.setItem(NEED_REFRESH_APP_LIST_KEY, '1') getRedirection(isCurrentWorkspaceEditor, { id: app.app_id }, push) }