Skip to content

Commit 600cd73

Browse files
committed
fix: improve formatting and add JSON validation in McpServersDialog
--bug=1060753 --user=刘瑞斌 【应用】AI对话节点的MCP使用自定义方式,配置格式错误依然可以保存成功 https://www.tapd.cn/62980211/s/1760128
1 parent c39d7a4 commit 600cd73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/src/views/application/component/McpServersDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const submit = () => {
154154
paramFormRef.value.validate((valid: any) => {
155155
if (valid) {
156156
try {
157-
JSON.parse(form.value.mcp_servers)
157+
JSON.parse(form.value.mcp_servers || '{}')
158158
} catch (e) {
159159
MsgError(t('views.applicationWorkflow.nodes.mcpNode.mcpServerTip'))
160160
return

0 commit comments

Comments
 (0)