From 175cfa3308b91647e70db8b7571e9dddab7f24a2 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 16 Sep 2025 10:37:13 +0800 Subject: [PATCH] fix: ensure mcp_source is set to 'custom' only when mcp_servers is not empty --- ui/src/views/application/component/McpServersDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/application/component/McpServersDialog.vue b/ui/src/views/application/component/McpServersDialog.vue index f07fa35ea..f6ce15d98 100644 --- a/ui/src/views/application/component/McpServersDialog.vue +++ b/ui/src/views/application/component/McpServersDialog.vue @@ -152,7 +152,7 @@ function mcpSourceChange() { const open = (data: any, selectOptions: any) => { form.value = { ...form.value, ...data } - if (data.mcp_servers) { + if (data.mcp_servers && Object.keys(data.mcp_servers).length > 0) { form.value.mcp_source = 'custom' } else if (data.mcp_tool_ids) { form.value.mcp_source = 'referencing'