Merge branch 'feat/plugins' into dev/plugin-deploy
This commit is contained in:
commit
7727ec822a
@ -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'}`}>
|
||||
<div className='flex w-4 h-4 justify-center items-center'>
|
||||
<Group />
|
||||
<div className='flex mr-0.5 w-5 h-5 justify-center items-center'>
|
||||
<Group className='w-4 h-4' />
|
||||
</div>
|
||||
<span className='px-0.5'>{t('common.menus.plugins')}</span>
|
||||
</div>
|
||||
|
@ -20,6 +20,7 @@ export const tagKeys = [
|
||||
export const categoryKeys = [
|
||||
'model',
|
||||
'tool',
|
||||
'agent',
|
||||
'extension',
|
||||
'bundle',
|
||||
]
|
||||
|
@ -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`),
|
||||
|
@ -28,6 +28,10 @@ const Description = async ({
|
||||
<span className='relative z-[2] lowercase'>{t('category.tools')}</span>
|
||||
</span>
|
||||
,
|
||||
<span className="relative ml-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected z-[1]">
|
||||
<span className='relative z-[2] lowercase'>{t('category.agents')}</span>
|
||||
</span>
|
||||
,
|
||||
<span className="relative ml-1 mr-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected z-[1]">
|
||||
<span className='relative z-[2] lowercase'>{t('category.extensions')}</span>
|
||||
</span>
|
||||
|
@ -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: <RiHammerLine className='mr-1.5 w-4 h-4' />,
|
||||
},
|
||||
{
|
||||
value: PLUGIN_TYPE_SEARCH_MAP.agent,
|
||||
text: t('plugin.category.agents'),
|
||||
icon: <RiUmbrellaLine className='mr-1.5 w-4 h-4' />,
|
||||
},
|
||||
{
|
||||
value: PLUGIN_TYPE_SEARCH_MAP.extension,
|
||||
text: t('plugin.category.extensions'),
|
||||
|
@ -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'
|
||||
|
||||
|
@ -6,6 +6,7 @@ export enum PluginType {
|
||||
tool = 'tool',
|
||||
model = 'model',
|
||||
extension = 'extension',
|
||||
agent = 'agent-strategy',
|
||||
}
|
||||
|
||||
export enum PluginSource {
|
||||
|
@ -70,6 +70,10 @@ const Marketplace = ({
|
||||
{t('plugin.category.tools')}
|
||||
</span>
|
||||
,
|
||||
<span className="relative ml-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
|
||||
{t('plugin.category.agents')}
|
||||
</span>
|
||||
,
|
||||
<span className="relative ml-1 mr-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
|
||||
{t('plugin.category.extensions')}
|
||||
</span>
|
||||
|
@ -3,6 +3,7 @@ const translation = {
|
||||
all: 'All',
|
||||
models: 'Models',
|
||||
tools: 'Tools',
|
||||
agents: 'Agent Strategy',
|
||||
extensions: 'Extensions',
|
||||
bundles: 'Bundles',
|
||||
},
|
||||
|
@ -3,6 +3,7 @@ const translation = {
|
||||
all: '全部',
|
||||
models: '模型',
|
||||
tools: '工具',
|
||||
agents: 'Agent Strategy',
|
||||
extensions: '扩展',
|
||||
bundles: '插件集',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user