From 1875368ea859a983fb6b7fc011024e0ba434811c Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 12 Aug 2025 11:14:44 +0800 Subject: [PATCH] feat: enhance MCP tool dialog with source selection and dynamic tool options --- .../component/McpServersDialog.vue | 81 +++++++++++++++-- .../application/component/ToolDialog.vue | 89 +++++++++++++++++++ ui/src/workflow/nodes/ai-chat-node/index.vue | 63 +++++++++++-- 3 files changed, 219 insertions(+), 14 deletions(-) create mode 100644 ui/src/views/application/component/ToolDialog.vue diff --git a/ui/src/views/application/component/McpServersDialog.vue b/ui/src/views/application/component/McpServersDialog.vue index a4b53ee6d..7500ac4ff 100644 --- a/ui/src/views/application/component/McpServersDialog.vue +++ b/ui/src/views/application/component/McpServersDialog.vue @@ -14,11 +14,31 @@ :model="form" require-asterisk-position="right" > - - + + + + {{ $t('views.applicationWorkflow.nodes.mcpNode.reference') }} + + {{ $t('common.custom') }} + + + + + + {{ mcpTool.name }} + + {{ $t('views.shared.title') }} + + + diff --git a/ui/src/views/application/component/ToolDialog.vue b/ui/src/views/application/component/ToolDialog.vue new file mode 100644 index 000000000..87332676f --- /dev/null +++ b/ui/src/views/application/component/ToolDialog.vue @@ -0,0 +1,89 @@ + + + diff --git a/ui/src/workflow/nodes/ai-chat-node/index.vue b/ui/src/workflow/nodes/ai-chat-node/index.vue index 03b6709d1..e804460b8 100644 --- a/ui/src/workflow/nodes/ai-chat-node/index.vue +++ b/ui/src/workflow/nodes/ai-chat-node/index.vue @@ -114,11 +114,23 @@ /> +
+
MCP
+
+ + + + +
+
{{ $t('views.applicationWorkflow.nodes.mcpNode.tool') }}
- - - +
+ + + + +
@@ -166,6 +178,7 @@ @refresh="submitReasoningDialog" /> +