mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Import and export MCP Server #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -2,13 +2,13 @@ import { useDeleteMcpServer } from '@/hooks/use-mcp-request';
|
||||
import { Trash2, Upload } from 'lucide-react';
|
||||
import { useCallback, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useExportMcp } from './use-export-mcp';
|
||||
|
||||
export function useBulkOperateMCP() {
|
||||
const { t } = useTranslation();
|
||||
const [selectedList, setSelectedList] = useState<Array<string>>([]);
|
||||
const { deleteMcpServer } = useDeleteMcpServer();
|
||||
|
||||
const handleEnableClick = useCallback(() => {}, []);
|
||||
const { handleExportMcpJson } = useExportMcp();
|
||||
|
||||
const handleDelete = useCallback(() => {
|
||||
deleteMcpServer(selectedList);
|
||||
@ -25,7 +25,7 @@ export function useBulkOperateMCP() {
|
||||
id: 'export',
|
||||
label: t('mcp.export'),
|
||||
icon: <Upload />,
|
||||
onClick: handleEnableClick,
|
||||
onClick: handleExportMcpJson(selectedList),
|
||||
},
|
||||
{
|
||||
id: 'delete',
|
||||
|
||||
Reference in New Issue
Block a user