@vrs-soft/wecom-aibot-mcp 2.4.18 → 2.4.19

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.
Files changed (2) hide show
  1. package/dist/client.js +5 -5
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -26,7 +26,7 @@ function buildApprovalCard(title, description, taskId, detailUrl) {
26
26
  const truncated = description.length > APPROVAL_DESC_MAX
27
27
  ? description.slice(0, APPROVAL_DESC_MAX) + '…(已截断,点击「详情」查看完整内容)'
28
28
  : description;
29
- const subTitle = truncated + `\n\n📋 TaskID: ${taskId}`;
29
+ const subTitle = truncated;
30
30
  const card = {
31
31
  card_type: 'button_interaction',
32
32
  main_title: { title },
@@ -252,8 +252,8 @@ class WecomClient extends EventEmitter {
252
252
  : eventKey === 'allow-always' ? '✅ 已允许(永久)'
253
253
  : '❌ 已拒绝';
254
254
  const toolInfo = approval.toolName ? `: ${approval.toolName}` : '';
255
- const desc = (approval.description || '').replace(/^执行命令:\s*/i, '');
256
- const descSnippet = desc ? `\n执行命令: ${desc.slice(0, 100)}${desc.length > 100 ? '…' : ''}` : '';
255
+ const desc = approval.description || '';
256
+ const descSnippet = desc ? `\n${desc.slice(0, 100)}${desc.length > 100 ? '…' : ''}` : '';
257
257
  const content = `**审批结果**${toolInfo}\n\n${resultText}${descSnippet}`;
258
258
  this.sendText(content).catch(err => {
259
259
  logger.error('wecom', `发送审批确认失败: ${err}`);
@@ -462,8 +462,8 @@ class WecomClient extends EventEmitter {
462
462
  const resultText = result === 'deny' ? '❌ 已拒绝' : '✅ 已允许';
463
463
  const reasonText = reason ? `\n\n原因:${reason}` : '';
464
464
  const toolInfo = approval.toolName ? `: ${approval.toolName}` : '';
465
- const desc = (approval.description || '').replace(/^执行命令:\s*/i, '');
466
- const descBlock = desc ? `\n\n**执行命令**\n\`\`\`\n${desc}\n\`\`\`` : '';
465
+ const desc = approval.description || '';
466
+ const descBlock = desc ? `\n\n\`\`\`\n${desc}\n\`\`\`` : '';
467
467
  this.sendText(`**审批结果(超时自动决策)**${toolInfo}\n\n${resultText}${reasonText}${descBlock}`).catch(err => {
468
468
  logger.error('[wecom] 发送审批确认失败:', err);
469
469
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vrs-soft/wecom-aibot-mcp",
3
- "version": "2.4.18",
3
+ "version": "2.4.19",
4
4
  "description": "企业微信智能机器人 MCP 服务 - Claude Code 审批通道",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",