claw-subagent-service 0.0.118 → 0.0.119

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.118",
3
+ "version": "0.0.119",
4
4
  "description": "虾说智能助手",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -294,14 +294,20 @@ class MessageHandler {
294
294
  }
295
295
  } catch (err) {
296
296
  this.log?.error(`[MessageHandler] 流式处理失败,回退到非流式: ${err.message}`);
297
- const reply = await this.handleNormalMessage(msg);
298
- if (reply) {
299
- const targetId = this.getReplyTarget(msg);
300
- await this.sendFn(targetId, reply, msg.conversationType);
301
- // 非流式回退成功,群聊轮数 +1
302
- if (msg.conversationType === 3) {
303
- this._incrementGroupRoundCount(msg.targetId, maxRounds);
297
+
298
+ // 只有非取消错误才回退到非流式处理
299
+ if (err.message !== 'canceled') {
300
+ const reply = await this.handleNormalMessage(msg);
301
+ if (reply) {
302
+ const targetId = this.getReplyTarget(msg);
303
+ await this.sendFn(targetId, reply, msg.conversationType);
304
+ // 非流式回退成功,群聊轮数 +1
305
+ if (msg.conversationType === 3) {
306
+ this._incrementGroupRoundCount(msg.targetId, maxRounds);
307
+ }
304
308
  }
309
+ } else {
310
+ this.log?.info(`[MessageHandler] 请求被取消,不回退到非流式处理`);
305
311
  }
306
312
  }
307
313
  } else {