diff --git a/web/app/components/header/plugins-nav/index.tsx b/web/app/components/header/plugins-nav/index.tsx index 8bc654d860..aa57e652b2 100644 --- a/web/app/components/header/plugins-nav/index.tsx +++ b/web/app/components/header/plugins-nav/index.tsx @@ -25,8 +25,8 @@ const PluginsNav = ({ rounded-xl system-sm-medium-uppercase ${activated ? 'border border-components-main-nav-nav-button-border bg-components-main-nav-nav-button-bg-active shadow-md text-components-main-nav-nav-button-text' : 'text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary'}`}> -
- +
+
{t('common.menus.plugins')}
diff --git a/web/app/components/plugins/constants.ts b/web/app/components/plugins/constants.ts index d4f683eb9b..c43a1ae946 100644 --- a/web/app/components/plugins/constants.ts +++ b/web/app/components/plugins/constants.ts @@ -20,6 +20,7 @@ export const tagKeys = [ export const categoryKeys = [ 'model', 'tool', + 'agent', 'extension', 'bundle', ] diff --git a/web/app/components/plugins/hooks.ts b/web/app/components/plugins/hooks.ts index 9b2bf61f10..ab6bbf14fe 100644 --- a/web/app/components/plugins/hooks.ts +++ b/web/app/components/plugins/hooks.ts @@ -42,6 +42,12 @@ export const useCategories = (translateFromOut?: TFunction) => { const t = translateFromOut || translation const categories = categoryKeys.map((category) => { + if (category === 'agent') { + return { + name: 'agent-strategy', + label: t(`plugin.category.${category}s`), + } + } return { name: category, label: t(`plugin.category.${category}s`), diff --git a/web/app/components/plugins/marketplace/description/index.tsx b/web/app/components/plugins/marketplace/description/index.tsx index 30ddc73595..337f456e6d 100644 --- a/web/app/components/plugins/marketplace/description/index.tsx +++ b/web/app/components/plugins/marketplace/description/index.tsx @@ -28,6 +28,10 @@ const Description = async ({ {t('category.tools')} , + + {t('category.agents')} + + , {t('category.extensions')} diff --git a/web/app/components/plugins/marketplace/plugin-type-switch.tsx b/web/app/components/plugins/marketplace/plugin-type-switch.tsx index 796e3a5073..3755a7bf2b 100644 --- a/web/app/components/plugins/marketplace/plugin-type-switch.tsx +++ b/web/app/components/plugins/marketplace/plugin-type-switch.tsx @@ -4,6 +4,7 @@ import { RiBrain2Line, RiHammerLine, RiPuzzle2Line, + RiUmbrellaLine, } from '@remixicon/react' import { PluginType } from '../types' import { useMarketplaceContext } from './context' @@ -14,6 +15,7 @@ export const PLUGIN_TYPE_SEARCH_MAP = { all: 'all', model: PluginType.model, tool: PluginType.tool, + agent: PluginType.agent, extension: PluginType.extension, bundle: 'bundle', } @@ -45,6 +47,11 @@ const PluginTypeSwitch = ({ text: t('plugin.category.tools'), icon: , }, + { + value: PLUGIN_TYPE_SEARCH_MAP.agent, + text: t('plugin.category.agents'), + icon: , + }, { value: PLUGIN_TYPE_SEARCH_MAP.extension, text: t('plugin.category.extensions'), diff --git a/web/app/components/plugins/marketplace/utils.ts b/web/app/components/plugins/marketplace/utils.ts index 0f91ea4390..78d4437681 100644 --- a/web/app/components/plugins/marketplace/utils.ts +++ b/web/app/components/plugins/marketplace/utils.ts @@ -101,6 +101,9 @@ export const getMarketplaceListCondition = (pluginType: string) => { if (pluginType === PluginType.tool) return 'category=tool' + if (pluginType === PluginType.agent) + return 'category=agent-strategy' + if (pluginType === PluginType.model) return 'category=model' diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index d130b08e42..a0558d1153 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -6,6 +6,7 @@ export enum PluginType { tool = 'tool', model = 'model', extension = 'extension', + agent = 'agent-strategy', } export enum PluginSource { diff --git a/web/app/components/tools/marketplace/index.tsx b/web/app/components/tools/marketplace/index.tsx index 7fa307c556..2b560b8a13 100644 --- a/web/app/components/tools/marketplace/index.tsx +++ b/web/app/components/tools/marketplace/index.tsx @@ -70,6 +70,10 @@ const Marketplace = ({ {t('plugin.category.tools')} , + + {t('plugin.category.agents')} + + , {t('plugin.category.extensions')} diff --git a/web/i18n/en-US/plugin.ts b/web/i18n/en-US/plugin.ts index 99df176c32..3ab1110440 100644 --- a/web/i18n/en-US/plugin.ts +++ b/web/i18n/en-US/plugin.ts @@ -3,6 +3,7 @@ const translation = { all: 'All', models: 'Models', tools: 'Tools', + agents: 'Agent Strategy', extensions: 'Extensions', bundles: 'Bundles', }, diff --git a/web/i18n/zh-Hans/plugin.ts b/web/i18n/zh-Hans/plugin.ts index b7d1678925..59ce344b3f 100644 --- a/web/i18n/zh-Hans/plugin.ts +++ b/web/i18n/zh-Hans/plugin.ts @@ -3,6 +3,7 @@ const translation = { all: '全部', models: '模型', tools: '工具', + agents: 'Agent Strategy', extensions: '扩展', bundles: '插件集', },