This commit is contained in:
jZonG 2025-05-07 19:53:45 +08:00
parent 3258a91d5d
commit 4123c0a960
2 changed files with 37 additions and 12 deletions

View File

@ -0,0 +1,20 @@
'use client'
import React from 'react'
type Props = {
searchText: string
}
const MCPList = ({
searchText,
}: Props) => {
return (
<>
<div>
MCP
{searchText}
</div>
</>
)
}
export default MCPList

View File

@ -15,6 +15,7 @@ import WorkflowToolEmpty from '@/app/components/tools/add-tool-modal/empty'
import Card from '@/app/components/plugins/card'
import CardMoreInfo from '@/app/components/plugins/card/card-more-info'
import PluginDetailPanel from '@/app/components/plugins/plugin-detail-panel'
import MCPList from './mcp'
import { useSelector as useAppContextSelector } from '@/context/app-context'
import { useAllToolProviders } from '@/service/use-tools'
import { useInstalledPluginList, useInvalidateInstalledPluginList } from '@/service/use-plugins'
@ -31,6 +32,7 @@ const ProviderList = () => {
{ value: 'builtin', text: t('tools.type.builtIn') },
{ value: 'api', text: t('tools.type.custom') },
{ value: 'workflow', text: t('tools.type.workflow') },
{ value: 'mcp', text: 'MCP' },
]
const [tagFilterValue, setTagFilterValue] = useState<string[]>([])
const handleTagsChange = (value: string[]) => {
@ -82,7 +84,9 @@ const ProviderList = () => {
options={options}
/>
<div className='flex items-center gap-2'>
{activeTab !== 'mcp' && (
<LabelFilter value={tagFilterValue} onChange={handleTagsChange} />
)}
<Input
showLeftIcon
showClearIcon
@ -130,8 +134,7 @@ const ProviderList = () => {
{!filteredCollectionList.length && activeTab === 'builtin' && (
<Empty lightCard text={t('tools.noTools')} className='h-[224px] px-12' />
)}
{
enable_marketplace && activeTab === 'builtin' && (
{enable_marketplace && activeTab === 'builtin' && (
<Marketplace
onMarketplaceScroll={() => {
containerRef.current?.scrollTo({ top: containerRef.current.scrollHeight, behavior: 'smooth' })
@ -139,8 +142,10 @@ const ProviderList = () => {
searchPluginText={keywords}
filterPluginTags={tagFilterValue}
/>
)
}
)}
{activeTab === 'mcp' && (
<MCPList searchText={keywords} />
)}
</div>
</div>
{currentProvider && !currentProvider.plugin_id && (