Feat: Delete MCP server #3221 (#8772)

### What problem does this PR solve?

Feat: Delete MCP server #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-10 14:28:27 +08:00
committed by GitHub
parent 2e0905d06a
commit 9f94d88acd
7 changed files with 56 additions and 19 deletions

View File

@ -1,3 +1,4 @@
import { useDeleteMcpServer } from '@/hooks/use-mcp-request';
import { Trash2, Upload } from 'lucide-react';
import { useCallback, useState } from 'react';
import { useTranslation } from 'react-i18next';
@ -5,10 +6,13 @@ import { useTranslation } from 'react-i18next';
export function useBulkOperateMCP() {
const { t } = useTranslation();
const [selectedList, setSelectedList] = useState<Array<string>>([]);
const { deleteMcpServer } = useDeleteMcpServer();
const handleEnableClick = useCallback(() => {}, []);
const handleDelete = useCallback(() => {}, []);
const handleDelete = useCallback(() => {
deleteMcpServer(selectedList);
}, [deleteMcpServer, selectedList]);
const handleSelectChange = useCallback((id: string, checked: boolean) => {
setSelectedList((list) => {