File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed
Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ export default {
228228 tool : 'Tool' ,
229229 toolParam : 'Tool Params' ,
230230 mcpServerTip : 'Please enter the JSON format of the MCP server config' ,
231+ mcpToolTip : 'Please select a tool' ,
231232 configLabel : 'MCP Server Config (Only supports SSE call method)' ,
232233 } ,
233234 imageGenerateNode : {
Original file line number Diff line number Diff line change @@ -227,7 +227,8 @@ export default {
227227 getTool : '获取工具' ,
228228 tool : '工具' ,
229229 toolParam : '工具参数' ,
230- mcpServerTip : '请输入 JSON 格式的 MCP 服务器配置' ,
230+ mcpServerTip : '请输入JSON格式的MCP服务器配置' ,
231+ mcpToolTip : '请选择工具' ,
231232 configLabel : 'MCP Server Config (仅支持SSE调用方式)'
232233 } ,
233234 imageGenerateNode : {
Original file line number Diff line number Diff line change @@ -227,7 +227,8 @@ export default {
227227 getTool : '獲取工具' ,
228228 tool : '工具' ,
229229 toolParam : '工具變數' ,
230- mcpServerTip : '請輸入 JSON 格式的 MCP 服務器配置' ,
230+ mcpServerTip : '請輸入JSON格式的MCP服務器配置' ,
231+ mcpToolTip : '請選擇工具' ,
231232 configLabel : 'MCP Server Config (僅支持SSE調用方式)' ,
232233 } ,
233234 imageGenerateNode : {
Original file line number Diff line number Diff line change @@ -343,10 +343,21 @@ const validate = async () => {
343343 }
344344 }
345345 }
346- let ps = [replyNodeFormRef .value ?.validate ()]
347- return Promise .all (ps ).catch ((err : any ) => {
348- return Promise .reject ({ node: props .nodeModel , errMessage: err })
349- })
346+ if (replyNodeFormRef .value ) {
347+ const form = cloneDeep (form_data .value )
348+ if (! form .mcp_servers ) {
349+ return Promise .reject ({
350+ node: props .nodeModel ,
351+ errMessage: t (' views.applicationWorkflow.nodes.mcpNode.mcpServerTip' )
352+ })
353+ }
354+ if (! form .mcp_tool ) {
355+ return Promise .reject ({
356+ node: props .nodeModel ,
357+ errMessage: t (' views.applicationWorkflow.nodes.mcpNode.mcpToolTip' )
358+ })
359+ }
360+ }
350361}
351362
352363onMounted (() => {
You can’t perform that action at this time.
0 commit comments