@yaoyuanchao/dingtalk 1.4.17 → 1.4.18
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/package.json +1 -1
- package/src/channel.ts +8 -1
- package/src/config-schema.ts +2 -2
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -427,7 +427,14 @@ export const dingtalkPlugin = {
|
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
console.log(`[dingtalk] sendAttachment success: ${filename}`);
|
|
430
|
-
|
|
430
|
+
// Return format compatible with SDK expectations
|
|
431
|
+
return {
|
|
432
|
+
ok: true,
|
|
433
|
+
channel: 'dingtalk',
|
|
434
|
+
filename,
|
|
435
|
+
// SDK expects content array format for tool results
|
|
436
|
+
content: [{ type: 'text', text: JSON.stringify({ ok: true, filename }) }],
|
|
437
|
+
};
|
|
431
438
|
},
|
|
432
439
|
},
|
|
433
440
|
|
package/src/config-schema.ts
CHANGED
|
@@ -81,8 +81,8 @@ export const dingTalkConfigSchema = z.object({
|
|
|
81
81
|
' - chunk: Split into multiple messages (default, same as official channels)\n' +
|
|
82
82
|
' - file: Convert to .md file and send as attachment'
|
|
83
83
|
),
|
|
84
|
-
longTextThreshold: z.number().int().positive().default(
|
|
85
|
-
.describe('Character threshold for longTextMode=file (default
|
|
84
|
+
longTextThreshold: z.number().int().positive().default(8000).optional()
|
|
85
|
+
.describe('Character threshold for longTextMode=file (default 8000)'),
|
|
86
86
|
}).strict();
|
|
87
87
|
|
|
88
88
|
// 导出配置类型
|