@myassis/gateway 1.0.103 → 1.0.104

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.
@@ -1347,6 +1347,12 @@ class Session {
1347
1347
  };
1348
1348
  await Promise.all(llmResult.toolCalls.map(x => startToolCall(x)));
1349
1349
  toolCalls.push(toolCall);
1350
+ // 重置 toolCall:下一轮工具调用必须开启新的分组。
1351
+ // 否则模型连续多轮只返回工具调用(无正文)时,所有轮次的结果会
1352
+ // 累积进同一个 toolCall 对象,并被重复 push 到 toolCalls 数组,
1353
+ // 导致持久化消息出现重复的工具调用组,历史回放时模型看到重复
1354
+ // 的 tool_calls/tool 结果对,进而重复执行工具。
1355
+ toolCall = null;
1350
1356
  // 本轮工具已执行完,增量落库一次。工具轮次可能很多且每轮都耗时,
1351
1357
  // 这里保存能让崩溃后仍保留已完成的工具调用记录。
1352
1358
  if (!childAgent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myassis/gateway",
3
- "version": "1.0.103",
3
+ "version": "1.0.104",
4
4
  "description": "我的助手 Gateway Service - 本地 AI 网关服务,支持认证、WebSocket 实时通信和任务调度",
5
5
  "main": "dist/index.js",
6
6
  "bin": {