add datasource category

This commit is contained in:
zxhlyh 2025-06-12 15:05:17 +08:00
parent 808f792f55
commit a7eb534761
5 changed files with 16 additions and 1 deletions

View File

@ -21,8 +21,8 @@ export const tagKeys = [
export const categoryKeys = [
'model',
'tool',
'datasource',
'agent-strategy',
'extension',
'bundle',
'datasource',
]

View File

@ -44,6 +44,10 @@ const Description = async ({
<span className='relative z-[2] lowercase'>{t('category.tools')}</span>
</span>
,
<span className="body-md-medium relative z-[1] ml-1 text-text-secondary after:absolute after:bottom-[1.5px] after:left-0 after:h-2 after:w-full after:bg-text-text-selected after:content-['']">
<span className='relative z-[2] lowercase'>{t('category.datasources')}</span>
</span>
,
<span className="body-md-medium relative z-[1] ml-1 text-text-secondary after:absolute after:bottom-[1.5px] after:left-0 after:h-2 after:w-full after:bg-text-text-selected after:content-['']">
<span className='relative z-[2] lowercase'>{t('category.agents')}</span>
</span>

View File

@ -21,6 +21,7 @@ export const PLUGIN_TYPE_SEARCH_MAP = {
tool: PluginType.tool,
agent: PluginType.agent,
extension: PluginType.extension,
datasource: PluginType.datasource,
bundle: 'bundle',
}
type PluginTypeSwitchProps = {
@ -56,6 +57,11 @@ const PluginTypeSwitch = ({
text: t('plugin.category.tools'),
icon: <RiHammerLine className='mr-1.5 h-4 w-4' />,
},
{
value: PLUGIN_TYPE_SEARCH_MAP.datasource,
text: t('plugin.category.datasources'),
icon: <RiHammerLine className='mr-1.5 h-4 w-4' />,
},
{
value: PLUGIN_TYPE_SEARCH_MAP.agent,
text: t('plugin.category.agents'),

View File

@ -7,6 +7,7 @@ export enum PluginType {
model = 'model',
extension = 'extension',
agent = 'agent-strategy',
datasource = 'datasource',
}
export enum PluginSource {

View File

@ -71,6 +71,10 @@ const Marketplace = ({
{t('plugin.category.tools')}
</span>
,
<span className="body-md-medium relative ml-1 text-text-secondary after:absolute after:bottom-[1.5px] after:left-0 after:h-2 after:w-full after:bg-text-text-selected after:content-['']">
{t('plugin.category.datasources')}
</span>
,
<span className="body-md-medium relative ml-1 text-text-secondary after:absolute after:bottom-[1.5px] after:left-0 after:h-2 after:w-full after:bg-text-text-selected after:content-['']">
{t('plugin.category.agents')}
</span>