dingtalk-mcp 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DingTalkMCPServer.js +15 -1
- package/package.json +1 -1
|
@@ -397,18 +397,32 @@ export class DingTalkMCPServer {
|
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
+
// 如果模型没有对应提参,则不赋值给API对应的入参
|
|
401
|
+
if (!args[arg.name]) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
400
404
|
//Object类型参数,递归处理
|
|
401
405
|
let objParmas = arg.name.split('.');
|
|
402
406
|
if (objParmas && objParmas.length > 1) {
|
|
403
407
|
if (objParmas.length == 2){
|
|
408
|
+
if (!body[objParmas[0]]){
|
|
409
|
+
body[objParmas[0]] = {};
|
|
410
|
+
}
|
|
404
411
|
body[objParmas[0]][objParmas[1]] = args[arg.name];
|
|
405
412
|
}
|
|
406
413
|
if (objParmas.length == 3){
|
|
414
|
+
if (!body[objParmas[0]]){
|
|
415
|
+
body[objParmas[0]] = {};
|
|
416
|
+
}
|
|
417
|
+
if (!body[objParmas[1]]){
|
|
418
|
+
body[objParmas[1]] = {};
|
|
419
|
+
}
|
|
407
420
|
body[objParmas[0]][objParmas[1]][objParmas[2]] = args[arg.name];
|
|
408
421
|
}
|
|
409
|
-
|
|
422
|
+
return;
|
|
410
423
|
}
|
|
411
424
|
|
|
425
|
+
|
|
412
426
|
// userIds参数直接传递为数组类型,保证请求体为正确的JSON对象
|
|
413
427
|
if (arg.name === 'userIds' && Array.isArray(args[arg.name])) {
|
|
414
428
|
body[arg.name] = args[arg.name];
|