From b6919c34f8889ccf146e3b968835e24726817013 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 22 Aug 2025 17:46:51 +0800 Subject: [PATCH] fix: enhance mcp_source logic in McpServersDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1060762 --user=刘瑞斌 【应用】v2.0.2版本已存在的应用的MCP,升级版本后,编辑界面,MCP回显错误 https://www.tapd.cn/62980211/s/1760254 --- .../views/application/component/McpServersDialog.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/src/views/application/component/McpServersDialog.vue b/ui/src/views/application/component/McpServersDialog.vue index d28d8ad5d..a45530839 100644 --- a/ui/src/views/application/component/McpServersDialog.vue +++ b/ui/src/views/application/component/McpServersDialog.vue @@ -145,7 +145,15 @@ function mcpSourceChange() { const open = (data: any, selectOptions: any) => { form.value = {...form.value, ...data} - form.value.mcp_source = data.mcp_source || 'referencing' + if (data.mcp_servers) { + form.value.mcp_source = 'custom' + } else if (data.mcp_tool_id) { + form.value.mcp_source = 'referencing' + form.value.mcp_tool_id = data.mcp_tool_id + form.value.mcp_servers = '' + } else { + form.value.mcp_source = data.mcp_source || 'referencing' + } dialogVisible.value = true mcpToolSelectOptions.value = selectOptions || [] }