()
| 717 | } |
| 718 | |
| 719 | const deleteServer = async () => { |
| 720 | const isConfirmed = await confirm({ |
| 721 | title: 'Delete MCP Server', |
| 722 | description: `Delete MCP server "${serverName}"?`, |
| 723 | confirmButtonName: 'Delete', |
| 724 | cancelButtonName: 'Cancel' |
| 725 | }) |
| 726 | if (isConfirmed) { |
| 727 | try { |
| 728 | const resp = await customMcpServersApi.deleteCustomMcpServer(serverId) |
| 729 | if (resp.data) { |
| 730 | showSnackbar('MCP Server deleted') |
| 731 | onConfirm() |
| 732 | } |
| 733 | } catch (error) { |
| 734 | showSnackbar(`Failed to delete MCP Server: ${getErrorMsg(error)}`, 'error') |
| 735 | onCancel() |
| 736 | } |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | const component = show ? ( |
| 741 | <Dialog |
nothing calls this directly
no test coverage detected