Skip to content

Commit b6919c3

Browse files
committed
fix: enhance mcp_source logic in McpServersDialog
--bug=1060762 --user=刘瑞斌 【应用】v2.0.2版本已存在的应用的MCP,升级版本后,编辑界面,MCP回显错误 https://www.tapd.cn/62980211/s/1760254
1 parent 925cede commit b6919c3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ui/src/views/application/component/McpServersDialog.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,15 @@ function mcpSourceChange() {
145145
146146
const open = (data: any, selectOptions: any) => {
147147
form.value = {...form.value, ...data}
148-
form.value.mcp_source = data.mcp_source || 'referencing'
148+
if (data.mcp_servers) {
149+
form.value.mcp_source = 'custom'
150+
} else if (data.mcp_tool_id) {
151+
form.value.mcp_source = 'referencing'
152+
form.value.mcp_tool_id = data.mcp_tool_id
153+
form.value.mcp_servers = ''
154+
} else {
155+
form.value.mcp_source = data.mcp_source || 'referencing'
156+
}
149157
dialogVisible.value = true
150158
mcpToolSelectOptions.value = selectOptions || []
151159
}

0 commit comments

Comments
 (0)