claw-subagent-service 0.0.155 → 0.0.156

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claw-subagent-service",
3
- "version": "0.0.155",
3
+ "version": "0.0.156",
4
4
  "description": "虾说智能助手",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -178,9 +178,16 @@ class RongyunMessageSender {
178
178
  let result;
179
179
  if (this.rongcloudClient.ServiceChatMessage && msgType.includes('service')) {
180
180
  // 客服相关消息使用 service_chat 自定义消息类型
181
+ // 对于客服消息,直接将业务内容放在顶层,方便前端解析
182
+ const serviceChatPayload = {
183
+ msg_type: msgType,
184
+ ...content, // 展开业务内容(status, content, sessionId, userId 等)
185
+ request_id: requestId || '',
186
+ timestamp: Math.floor(Date.now() / 1000),
187
+ };
181
188
  result = await this.rongcloudClient.sendCustomMessage(
182
189
  targetId,
183
- messagePayload,
190
+ serviceChatPayload,
184
191
  1, // PRIVATE
185
192
  'service_chat'
186
193
  );