diff --git a/web/app/components/plugins/hooks.ts b/web/app/components/plugins/hooks.ts
new file mode 100644
index 0000000000..ebee3a6331
--- /dev/null
+++ b/web/app/components/plugins/hooks.ts
@@ -0,0 +1,15 @@
+import { useRequest } from 'ahooks'
+
+export const useCheckInstallStatus = () => {
+ const { data, run, cancel } = useRequest(async () => {}, {
+ manual: true,
+ pollingInterval: 5000,
+ pollingErrorRetryCount: 2,
+ })
+
+ return {
+ data,
+ run,
+ cancel,
+ }
+}
diff --git a/web/app/components/plugins/marketplace/plugin-type-switch.tsx b/web/app/components/plugins/marketplace/plugin-type-switch.tsx
index 16be79db26..8f3c478c57 100644
--- a/web/app/components/plugins/marketplace/plugin-type-switch.tsx
+++ b/web/app/components/plugins/marketplace/plugin-type-switch.tsx
@@ -1,46 +1,56 @@
'use client'
import { useState } from 'react'
+import { PluginType } from '../types'
import {
+ RiArchive2Line,
+ RiBrain2Line,
RiHammerLine,
RiPuzzle2Line,
} from '@remixicon/react'
import cn from '@/utils/classnames'
+const PLUGIN_TYPE_SEARCH_MAP = {
+ all: 'all',
+ model: PluginType.model,
+ tool: PluginType.tool,
+ extension: PluginType.extension,
+ bundle: 'bundle',
+}
type PluginTypeSwitchProps = {
onChange?: (type: string) => void
}
const options = [
{
- value: 'all',
+ value: PLUGIN_TYPE_SEARCH_MAP.all,
text: 'All',
icon: null,
},
{
- value: 'models',
+ value: PLUGIN_TYPE_SEARCH_MAP.model,
text: 'Models',
- icon: null,
+ icon: