claw-subagent-service 0.0.99 → 0.0.100
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
|
@@ -497,6 +497,9 @@ class MessageHandler {
|
|
|
497
497
|
const msgType = msg.messageType;
|
|
498
498
|
const content = msg.content;
|
|
499
499
|
|
|
500
|
+
// 调试:打印完整消息内容
|
|
501
|
+
this.log?.info(`[_extractMessageContent] msgType=${msgType}, content=${JSON.stringify(content).substring(0, 200)}`);
|
|
502
|
+
|
|
500
503
|
// 文本消息
|
|
501
504
|
if (msgType === 'RC:TxtMsg') {
|
|
502
505
|
return typeof content === 'string' ? content : (content?.content || JSON.stringify(content));
|
|
@@ -504,30 +507,34 @@ class MessageHandler {
|
|
|
504
507
|
|
|
505
508
|
// 图片消息
|
|
506
509
|
if (msgType === 'RC:ImgMsg') {
|
|
507
|
-
const imageUri = content?.imageUri || '';
|
|
510
|
+
const imageUri = content?.imageUri || content?.imageUrl || content?.url || '';
|
|
511
|
+
this.log?.info(`[_extractMessageContent] 图片消息: imageUri=${imageUri}`);
|
|
508
512
|
return `[图片] ${imageUri}`;
|
|
509
513
|
}
|
|
510
514
|
|
|
511
515
|
// 视频消息
|
|
512
516
|
if (msgType === 'RC:SightMsg') {
|
|
513
|
-
const sightUrl = content?.sightUrl || '';
|
|
517
|
+
const sightUrl = content?.sightUrl || content?.url || '';
|
|
514
518
|
const name = content?.name || '未知视频';
|
|
515
519
|
const duration = content?.duration || 0;
|
|
520
|
+
this.log?.info(`[_extractMessageContent] 视频消息: sightUrl=${sightUrl}`);
|
|
516
521
|
return `[视频] ${sightUrl} ${name} ${duration}秒`;
|
|
517
522
|
}
|
|
518
523
|
|
|
519
524
|
// 文件消息
|
|
520
525
|
if (msgType === 'RC:FileMsg') {
|
|
521
|
-
const fileUrl = content?.fileUrl || '';
|
|
526
|
+
const fileUrl = content?.fileUrl || content?.fileUri || content?.url || '';
|
|
522
527
|
const name = content?.name || '未知文件';
|
|
523
528
|
const size = content?.size || 0;
|
|
529
|
+
this.log?.info(`[_extractMessageContent] 文件消息: fileUrl=${fileUrl}`);
|
|
524
530
|
return `[文件] ${fileUrl} ${name} ${size}`;
|
|
525
531
|
}
|
|
526
532
|
|
|
527
533
|
// 语音消息
|
|
528
534
|
if (msgType === 'RC:HQVCMsg') {
|
|
529
|
-
const remoteUrl = content?.remoteUrl || '';
|
|
535
|
+
const remoteUrl = content?.remoteUrl || content?.url || '';
|
|
530
536
|
const duration = content?.duration || 0;
|
|
537
|
+
this.log?.info(`[_extractMessageContent] 语音消息: remoteUrl=${remoteUrl}`);
|
|
531
538
|
return `[语音] ${remoteUrl} ${duration}秒`;
|
|
532
539
|
}
|
|
533
540
|
|