@mcpcn/mcp-notification 1.1.1 → 1.1.2
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/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12,7 +12,9 @@ function resolveChatSessionId(request) {
|
|
|
12
12
|
}
|
|
13
13
|
return undefined;
|
|
14
14
|
};
|
|
15
|
-
return (pick(request?.params?.
|
|
15
|
+
return (pick(request?.params?.arguments, ['chatSessionId', 'chatSessionID']) ??
|
|
16
|
+
pick(request?.meta, ['chatSessionId', 'chatSessionID']) ??
|
|
17
|
+
pick(request?.params?._meta, ['chatSessionId', 'chatSessionID']) ??
|
|
16
18
|
pick(request?.params?.meta, ['chatSessionId', 'chatSessionID']) ??
|
|
17
19
|
pick(request?._meta, ['chatSessionId', 'chatSessionID']));
|
|
18
20
|
}
|
|
@@ -134,6 +136,7 @@ class ReminderServer {
|
|
|
134
136
|
}));
|
|
135
137
|
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
136
138
|
try {
|
|
139
|
+
console.error('[调试] request.params keys = ' + JSON.stringify(Object.keys(request.params || {})));
|
|
137
140
|
if (!request.params.arguments || typeof request.params.arguments !== 'object') {
|
|
138
141
|
throw new McpError(ErrorCode.InvalidParams, '无效的参数');
|
|
139
142
|
}
|