chore(version): 1.1.11
This commit is contained in:
parent
403ed8cbf4
commit
29f7da1a4c
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "CherryStudio",
|
"name": "CherryStudio",
|
||||||
"version": "1.1.10",
|
"version": "1.1.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "A powerful AI assistant for producer.",
|
"description": "A powerful AI assistant for producer.",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
|
|||||||
@ -22,6 +22,8 @@ interface SearchResult {
|
|||||||
|
|
||||||
const npmScopes = ['@mcpmarket', '@modelcontextprotocol', '@gongrzhe']
|
const npmScopes = ['@mcpmarket', '@modelcontextprotocol', '@gongrzhe']
|
||||||
|
|
||||||
|
let _searchResults: SearchResult[] = []
|
||||||
|
|
||||||
const NpxSearch: FC = () => {
|
const NpxSearch: FC = () => {
|
||||||
const { theme } = useTheme()
|
const { theme } = useTheme()
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
@ -30,9 +32,11 @@ const NpxSearch: FC = () => {
|
|||||||
// Add new state variables for npm scope search
|
// Add new state variables for npm scope search
|
||||||
const [npmScope, setNpmScope] = useState('@modelcontextprotocol')
|
const [npmScope, setNpmScope] = useState('@modelcontextprotocol')
|
||||||
const [searchLoading, setSearchLoading] = useState(false)
|
const [searchLoading, setSearchLoading] = useState(false)
|
||||||
const [searchResults, setSearchResults] = useState<SearchResult[]>([])
|
const [searchResults, setSearchResults] = useState<SearchResult[]>(_searchResults)
|
||||||
const { addMCPServer } = useMCPServers()
|
const { addMCPServer } = useMCPServers()
|
||||||
|
|
||||||
|
_searchResults = searchResults
|
||||||
|
|
||||||
// Add new function to handle npm scope search
|
// Add new function to handle npm scope search
|
||||||
const handleNpmSearch = async () => {
|
const handleNpmSearch = async () => {
|
||||||
if (!npmScope.trim()) {
|
if (!npmScope.trim()) {
|
||||||
|
|||||||
@ -86,9 +86,9 @@ const MCPSettings: FC = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const _selectedMcpServer = mcpServers.find((server) => server.id === selectedMcpServer?.id)
|
const _selectedMcpServer = mcpServers.find((server) => server.id === selectedMcpServer?.id)
|
||||||
setSelectedMcpServer(_selectedMcpServer || mcpServers[0])
|
setSelectedMcpServer(_selectedMcpServer || mcpServers[0])
|
||||||
}, [mcpServers, selectedMcpServer])
|
}, [mcpServers, route, selectedMcpServer])
|
||||||
|
|
||||||
const MainContent = () => {
|
const MainContent = useCallback(() => {
|
||||||
if (route === 'npx-search' || isEmpty(mcpServers)) {
|
if (route === 'npx-search' || isEmpty(mcpServers)) {
|
||||||
return (
|
return (
|
||||||
<SettingContainer theme={theme}>
|
<SettingContainer theme={theme}>
|
||||||
@ -110,7 +110,7 @@ const MCPSettings: FC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return <NpxSearch />
|
return <NpxSearch />
|
||||||
}
|
}, [mcpServers, route, selectedMcpServer, theme])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user