From 8220f52aceaf9dfd659a47fc5c55230369d7c34e Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 18 Sep 2025 11:09:26 +0800 Subject: [PATCH] fix: initialize mcp_tool_ids as an empty array and update conditional rendering for mcp_servers --- .../component/McpServersDialog.vue | 4 ++-- ui/src/workflow/nodes/ai-chat-node/index.vue | 21 +++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ui/src/views/application/component/McpServersDialog.vue b/ui/src/views/application/component/McpServersDialog.vue index f6ce15d98..e16dc5961 100644 --- a/ui/src/views/application/component/McpServersDialog.vue +++ b/ui/src/views/application/component/McpServersDialog.vue @@ -135,7 +135,7 @@ watch(dialogVisible, (bool) => { if (!bool) { form.value = { mcp_servers: '', - mcp_tool_ids: '', + mcp_tool_ids: [], mcp_source: 'referencing', } paramFormRef.value?.clearValidate() @@ -146,7 +146,7 @@ function mcpSourceChange() { if (form.value.mcp_source === 'referencing') { form.value.mcp_servers = '' } else { - form.value.mcp_tool_ids = '' + form.value.mcp_tool_ids = [] } } diff --git a/ui/src/workflow/nodes/ai-chat-node/index.vue b/ui/src/workflow/nodes/ai-chat-node/index.vue index 1f38ffb1e..28d742d4e 100644 --- a/ui/src/workflow/nodes/ai-chat-node/index.vue +++ b/ui/src/workflow/nodes/ai-chat-node/index.vue @@ -146,10 +146,7 @@
+
+
+ +
+ {{ + $t('common.custom') + ' MCP' + }} +
+
+ + + +
{{ $t('views.tool.title') }}