diff --git a/web/app/components/plugins/install-plugin/install-from-github/steps/loaded.tsx b/web/app/components/plugins/install-plugin/install-from-github/steps/loaded.tsx
index 6338e387f7..6b63c24aea 100644
--- a/web/app/components/plugins/install-plugin/install-from-github/steps/loaded.tsx
+++ b/web/app/components/plugins/install-plugin/install-from-github/steps/loaded.tsx
@@ -7,7 +7,8 @@ import Card from '../../../card'
import Badge, { BadgeState } from '@/app/components/base/badge/index'
import { pluginManifestToCardPluginProps } from '../../utils'
import { useTranslation } from 'react-i18next'
-import { installPackageFromGitHub, updateFromGitHub } from '@/service/plugins'
+import { updateFromGitHub } from '@/service/plugins'
+import { useInstallPackageFromGitHub } from '@/service/use-plugins'
import { RiLoader2Line } from '@remixicon/react'
import { usePluginTaskList } from '@/service/use-plugins'
import checkTaskStatus from '../../base/check-task-status'
@@ -40,6 +41,7 @@ const Loaded: React.FC
= ({
}) => {
const { t } = useTranslation()
const [isInstalling, setIsInstalling] = React.useState(false)
+ const { mutateAsync: installPackageFromGitHub } = useInstallPackageFromGitHub()
const { handleRefetch } = usePluginTaskList()
const { check } = checkTaskStatus()
@@ -72,12 +74,12 @@ const Loaded: React.FC = ({
onInstalled()
}
else {
- const { all_installed: isInstalled, task_id: taskId } = await installPackageFromGitHub(
- `${owner}/${repo}`,
+ const { all_installed: isInstalled, task_id: taskId } = await installPackageFromGitHub({
+ repoUrl: `${owner}/${repo}`,
selectedVersion,
selectedPackage,
uniqueIdentifier,
- )
+ })
if (isInstalled) {
onInstalled()
diff --git a/web/app/components/plugins/plugin-page/index.tsx b/web/app/components/plugins/plugin-page/index.tsx
index 2cba8cf939..d089d37543 100644
--- a/web/app/components/plugins/plugin-page/index.tsx
+++ b/web/app/components/plugins/plugin-page/index.tsx
@@ -132,7 +132,7 @@ const PluginPage = ({
options={options}
/>