Skip to content

Commit 6e57aaa

Browse files
committed
fix: review suggestion
1 parent 5fc7d77 commit 6e57aaa

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/vue-generator/src/plugins/genMcpPlugin.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ function transformTinyMcpConfig(schema) {
489489
value: `{
490490
server,
491491
business: {
492-
id: '${mcpConfig.id}',
493-
description: '${mcpConfig.description}'
492+
id: ${JSON.stringify(mcpConfig.id)},
493+
description: ${JSON.stringify(mcpConfig.description)}
494494
}
495495
}`
496496
}
@@ -769,7 +769,9 @@ export const handleTinyMcpConfigAttrHook = (schemaData, globalHooks, config) =>
769769
// 转换为完整格式的 JSExpression
770770
const transformedConfig = {
771771
type: 'JSExpression',
772-
value: `{ server, business: { id: '${mcpConfig.id}', description: '${mcpConfig.description}' } }`
772+
value: `{ server, business: { id: ${JSON.stringify(mcpConfig.id)}, description: ${JSON.stringify(
773+
mcpConfig.description
774+
)} } }`
773775
}
774776

775777
// 更新 props

0 commit comments

Comments
 (0)