Feat: Edit MCP server #3221 (#8784)

### What problem does this PR solve?

Feat: Edit MCP server #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-11 10:34:57 +08:00
committed by GitHub
parent 98829f5dbe
commit fc0c81acc6
9 changed files with 109 additions and 58 deletions

View File

@ -7,15 +7,18 @@ import { isPlainObject } from 'lodash';
import { useMemo } from 'react';
import { McpDropdown } from './mcp-dropdown';
import { UseBulkOperateMCPReturnType } from './use-bulk-operate-mcp';
import { UseEditMcpReturnType } from './use-edit-mcp';
export type DatasetCardProps = {
data: IMcpServer;
} & Pick<UseBulkOperateMCPReturnType, 'handleSelectChange' | 'selectedList'>;
} & Pick<UseBulkOperateMCPReturnType, 'handleSelectChange' | 'selectedList'> &
Pick<UseEditMcpReturnType, 'showEditModal'>;
export function McpCard({
data,
selectedList,
handleSelectChange,
showEditModal,
}: DatasetCardProps) {
const toolLength = useMemo(() => {
const tools = data.variables?.tools;
@ -35,7 +38,7 @@ export function McpCard({
<section className="flex justify-between pb-2">
<h3 className="text-lg font-semibold line-clamp-1">{data.name}</h3>
<div className="space-x-4">
<McpDropdown mcpId={data.id}>
<McpDropdown mcpId={data.id} showEditModal={showEditModal}>
<MoreButton></MoreButton>
</McpDropdown>
<Checkbox