@mcpcn/mcp-notification 1.0.6 → 1.0.8

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/index.js +9 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -94,6 +94,15 @@ class ReminderServer {
94
94
  request?.params?.chatSessionId;
95
95
  if (!chatSessionId) {
96
96
  console.error('未在请求中检测到 chatSessionId(meta.chatSessionId)');
97
+ const baseMsg = '解析设备失败: chatSessionId不能为空,工具暂无法使用';
98
+ const errText = name === 'set_reminder'
99
+ ? `设置失败:${baseMsg}`
100
+ : name === 'list_reminders'
101
+ ? `获取失败:${baseMsg}`
102
+ : name === 'cancel_reminder'
103
+ ? `取消失败:${baseMsg}`
104
+ : baseMsg;
105
+ return { content: [{ type: 'text', text: errText }], isError: true };
97
106
  }
98
107
  else {
99
108
  console.error(`接收到 chatSessionId: ${chatSessionId}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpcn/mcp-notification",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "系统通知MCP服务器",
5
5
  "packageManager": "yarn@1.22.22",
6
6
  "main": "dist/index.js",