claw-subagent-service 0.0.121 → 0.0.123

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.121",
3
+ "version": "0.0.123",
4
4
  "description": "虾说智能助手",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -683,8 +683,10 @@ class MessageHandler {
683
683
  // 尝试解析 content 是否为 JSON(包含 fileUrl)
684
684
  try {
685
685
  const contentObj = JSON.parse(content);
686
- if (contentObj.fileUrl) {
687
- fileUrl = contentObj.fileUrl;
686
+ if (contentObj.fileUrl || contentObj.fileUri) {
687
+ fileUrl = contentObj.fileUrl || contentObj.fileUri;
688
+ name = contentObj.name || '未知文件';
689
+ size = contentObj.size || 0;
688
690
  }
689
691
  } catch (e) {
690
692
  // content 不是 JSON
@@ -202,8 +202,11 @@ class RongCloudClient {
202
202
  }
203
203
  }
204
204
 
205
+ // 对于媒体消息,保留完整的 JSON 字符串,不要提取 content 字段
205
206
  const userContent = parsed && !parsed.msg_type
206
- ? (parsed.content || parsed.text || JSON.stringify(parsed))
207
+ ? (['RC:ImgMsg', 'RC:SightMsg', 'RC:FileMsg', 'RC:HQVCMsg'].includes(msgType)
208
+ ? JSON.stringify(parsed)
209
+ : (parsed.content || parsed.text || JSON.stringify(parsed)))
207
210
  : content;
208
211
 
209
212
  if (!userContent || !userContent.trim || !userContent.trim()) {