claw-subagent-service 0.0.120 → 0.0.121

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.120",
3
+ "version": "0.0.121",
4
4
  "description": "虾说智能助手",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -639,6 +639,8 @@ class MessageHandler {
639
639
  const contentObj = JSON.parse(content);
640
640
  if (contentObj.sightUrl) {
641
641
  sightUrl = contentObj.sightUrl;
642
+ name = contentObj.name || '未知视频';
643
+ duration = contentObj.duration || 0;
642
644
  }
643
645
  } catch (e) {
644
646
  // content 不是 JSON,可能是 base64 缩略图
@@ -172,6 +172,9 @@ class RongCloudClient {
172
172
  // command 等结构化消息保留完整 JSON(上层需要 msg_type 等字段)
173
173
  if (message.messageType === 'command' || rawContent.msg_type) {
174
174
  rawContent = JSON.stringify(rawContent);
175
+ } else if (['RC:ImgMsg', 'RC:SightMsg', 'RC:FileMsg', 'RC:HQVCMsg'].includes(message.messageType)) {
176
+ // 媒体消息保留完整对象,以便上层提取 URL
177
+ rawContent = JSON.stringify(rawContent);
175
178
  } else {
176
179
  rawContent = rawContent.content || rawContent.text || JSON.stringify(rawContent);
177
180
  }