From 2971406909126a36642d549ab28ac473e79184ca Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 26 Mar 2025 16:45:33 +0800 Subject: [PATCH] feat: add placeholder for MCP server configuration in form fields --- ui/src/views/application/component/McpServersDialog.vue | 9 +++++++++ ui/src/workflow/nodes/mcp-node/index.vue | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/ui/src/views/application/component/McpServersDialog.vue b/ui/src/views/application/component/McpServersDialog.vue index 273a890ee..bdd6008e8 100644 --- a/ui/src/views/application/component/McpServersDialog.vue +++ b/ui/src/views/application/component/McpServersDialog.vue @@ -20,6 +20,7 @@ v-model="form.mcp_servers" :rows="6" type="textarea" + :placeholder="mcpServerJson" /> @@ -41,6 +42,14 @@ const emit = defineEmits(['refresh']) const paramFormRef = ref() +const mcpServerJson = `{ + "math": { + "url": "your_server", + "transport": "sse" + } +}` + + const form = ref({ mcp_servers: '', mcp_enable: false diff --git a/ui/src/workflow/nodes/mcp-node/index.vue b/ui/src/workflow/nodes/mcp-node/index.vue index 607b74666..2415184f1 100644 --- a/ui/src/workflow/nodes/mcp-node/index.vue +++ b/ui/src/workflow/nodes/mcp-node/index.vue @@ -18,6 +18,7 @@ v-model="form_data.mcp_servers" style="height: 150px" @submitDialog="submitDialog" + :placeholder="mcpServerJson" /> @@ -170,6 +171,13 @@ const props = defineProps<{ nodeModel: any }>() const dynamicsFormRef = ref() const loading = ref(false) +const mcpServerJson = `{ + "math": { + "url": "your_server", + "transport": "sse" + } +}` + const wheel = (e: any) => { if (e.ctrlKey === true) { e.preventDefault()