claw-subagent-service 0.0.45 → 0.0.46

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.45",
3
+ "version": "0.0.46",
4
4
  "description": "虾说智能助手",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -25,9 +25,9 @@ class MessageHandler {
25
25
  }
26
26
 
27
27
  shouldHandleMessage(msg) {
28
+ // Docker 中每次启动都是新连接,群聊@消息常以离线消息形式推送,不再静默过滤
28
29
  if (msg.isOffLineMessage) {
29
- this.log?.info('[MessageHandler] 忽略离线消息');
30
- return false;
30
+ this.log?.info('[MessageHandler] 收到离线消息,仍继续处理');
31
31
  }
32
32
 
33
33
  const allowedTypes = ['RC:TxtMsg', 'claw'];
@@ -100,9 +100,10 @@ class RongCloudClient {
100
100
  }
101
101
 
102
102
  handleReceivedMessage(message) {
103
- // 1. 过滤离线消息
103
+ // 1. 不再静默过滤离线消息:Docker 中每次启动都是新连接,
104
+ // 群聊@消息常以离线消息形式推送,过滤会导致消息丢失
104
105
  if (message.isOffLineMessage) {
105
- return;
106
+ this.log?.info('[RongCloudClient] 收到离线消息,仍继续处理');
106
107
  }
107
108
 
108
109
  // 2. 过滤自己发送的消息(融云 SDK 可能将发送消息回传)