fix(NpxSearch): update SearchResult type to use MCPServer type definition

This commit is contained in:
Vaayne 2025-04-08 20:44:58 +08:00 committed by 亢奋猫
parent c883fd85d8
commit fe7a392116

View File

@ -4,6 +4,7 @@ import { HStack } from '@renderer/components/Layout'
import { useTheme } from '@renderer/context/ThemeProvider' import { useTheme } from '@renderer/context/ThemeProvider'
import { useMCPServers } from '@renderer/hooks/useMCPServers' import { useMCPServers } from '@renderer/hooks/useMCPServers'
import { builtinMCPServers } from '@renderer/store/mcp' import { builtinMCPServers } from '@renderer/store/mcp'
import { MCPServer } from '@renderer/types'
import { Button, Card, Flex, Input, Space, Spin, Tag, Typography } from 'antd' import { Button, Card, Flex, Input, Space, Spin, Tag, Typography } from 'antd'
import { npxFinder } from 'npx-scope-finder' import { npxFinder } from 'npx-scope-finder'
import { type FC, useEffect, useState } from 'react' import { type FC, useEffect, useState } from 'react'
@ -19,7 +20,7 @@ interface SearchResult {
usage: string usage: string
npmLink: string npmLink: string
fullName: string fullName: string
type: 'stdio' | 'sse' | 'inMemory' type: MCPServer['type']
} }
const npmScopes = ['@cherry', '@modelcontextprotocol', '@gongrzhe', '@mcpmarket'] const npmScopes = ['@cherry', '@modelcontextprotocol', '@gongrzhe', '@mcpmarket']