diff --git a/src/apis/paths/mcp.ts b/src/apis/paths/mcp.ts index 9347f273a3cef7ea9abd0dcc7890fb5cf3402046..f0a258e4948b6b18107a56f0ed7e0966ff0b5645 100644 --- a/src/apis/paths/mcp.ts +++ b/src/apis/paths/mcp.ts @@ -34,6 +34,7 @@ const getMcpServiceDetail = (id: string) => { serviceId: string; icon: string; name: string; + overview: string; description: string; data: string; mcpType: 'stdio' | 'sse' | 'stream'; @@ -66,6 +67,7 @@ const createOrUpdateMcpService = (params: { serviceId?: string; icon: string; name: string; + overview: string; description: string; config: string; mcpType: 'stdio' | 'sse' | 'stream'; diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 6c3a5fda0405cc2d534a6a5e4d4e6c6d5b0f85c8..a3100b4c050b94389ba8ca2ff6d02dfdb8d2ac15 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -99,6 +99,7 @@ export default { create_mcp: 'Create MCP', edit_mcp: 'Edit MCP', mcp_name: 'MCP Name', + mcp_overview: 'MCP Overview', mcp_description: 'MCP Description', mcp_type: 'MCP Type', activate: 'Activate', @@ -107,6 +108,7 @@ export default { upload_icon: 'Upload Icon', please_upload_icon: 'Please upload icon', please_input_mcp_name: 'Please input MCP name', + please_input_mcp_overview: 'Please input MCP overview', please_select_mcp_description: 'Please select MCP description', server_detail: 'Server Details', server_tool: 'Server Tools', @@ -115,6 +117,7 @@ export default { tool_output_schema: 'Tool Output Schema', confirm_delete_interface: 'Are you sure to delete this interface?', confirm_delete_server: 'Are you sure to delete this server?', + no_brief_description_yet: 'No brief description yet', }, app: { app_center: 'App Center', diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 9c524ab305956661718f59ebdc4aff03b23f3b80..557cfeaa4d9455cdfa14734846e692289865fff6 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -98,6 +98,7 @@ export default { create_mcp: '创建MCP服务', edit_mcp: '编辑MCP服务', mcp_name: 'MCP名称', + mcp_overview: 'MCP简述', mcp_description: 'MCP描述', mcp_type: 'MCP类型', activate: '激活', @@ -106,6 +107,7 @@ export default { upload_icon: '上传图标', please_upload_icon: '请上传图标', please_input_mcp_name: '请输入MCP名称', + please_input_mcp_overview: '请输入MCP简述', please_select_mcp_description: '请选择MCP描述', server_detail: '服务详情', server_tool: '工具', @@ -114,6 +116,7 @@ export default { tool_output_schema: '工具出参', confirm_delete_interface: '确定删除此接口吗?', confirm_delete_server: '确定删除此服务吗?', + no_brief_description_yet: '暂无简述', }, app: { app_center: '应用中心', diff --git a/src/views/api/components/McpDrawer.vue b/src/views/api/components/McpDrawer.vue index 83c8f903c1345d01bbfd5f8529517a7b825c9455..cfb007dd3a8ee1611fbf830e6c3abae7f34cdb13 100644 --- a/src/views/api/components/McpDrawer.vue +++ b/src/views/api/components/McpDrawer.vue @@ -9,6 +9,7 @@ import i18n from 'src/i18n'; interface McpDetail { icon: string; name: string; + overview: string; description: string; type: 'stdio' | 'sse' | 'stream'; mcpConfig: string; @@ -51,6 +52,7 @@ const mcpConfigTemplate = { const form = reactive({ icon: '', name: '', + overview: '', description: '', type: 'stdio', mcpConfig: '', @@ -67,6 +69,13 @@ const rules = reactive>({ trigger: 'blur', }, ], + overview: [ + { + required: true, + message: t('plugin_center.please_input_mcp_overview'), + trigger: 'blur', + }, + ], name: [ { required: true, @@ -125,6 +134,7 @@ async function onConfirm(formEl: FormInstance | undefined) { if (!valid) return; const [, res] = await api.createOrUpdateMcpService({ serviceId: props.serviceId || undefined, + overview: form.overview, icon: form.icon, name: form.name, description: form.description, @@ -221,6 +231,15 @@ watch( :placeholder="t('plugin_center.please_input_mcp_name')" /> + + +

{{ mcpServiceDetail.name }}

-

{{ mcpServiceDetail.description }}

+

+ {{ + mcpServiceDetail.overview || + t('plugin_center.no_brief_description_yet') + }} +

@@ -229,7 +235,7 @@ watch( font-weight: 700; line-height: 24px; } - .desc { + .brief-description { max-width: 550px; margin-top: 8px; font-size: 14px; diff --git a/src/views/api/components/MonacoEditor.vue b/src/views/api/components/MonacoEditor.vue index fb7b3fead1f07ec5825f4e8686f18ab7d946bb4e..990df9e3e3538dff45d3fa40e4a26df32f45475d 100644 --- a/src/views/api/components/MonacoEditor.vue +++ b/src/views/api/components/MonacoEditor.vue @@ -70,6 +70,15 @@ onBeforeUnmount(() => { .editor-container { width: 100%; height: 100%; + + :deep(.monaco-editor) { + outline: none; + + .overflow-guard { + border: 1px solid rgb(195, 206, 223); + border-radius: 4px; + } + } } .code-container { diff --git a/src/views/api/index.vue b/src/views/api/index.vue index d5161a73568028a249d5013dc73a3a287e899c5e..4b6df0cbeff0f39daf111c5bada1dae5a7667254 100644 --- a/src/views/api/index.vue +++ b/src/views/api/index.vue @@ -712,7 +712,7 @@ img { } } :deep(.el-drawer__body) { - padding: 0px 24px 16px !important; + padding: 0px 24px 16px; .drawerBody { height: 100%; textarea {