agent-swarm-kit 1.0.46 → 1.0.47

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/build/index.cjs CHANGED
@@ -1212,12 +1212,17 @@ var ClientHistory = /** @class */ (function () {
1212
1212
  var tool_call_id = _a.tool_call_id;
1213
1213
  return tool_call_id;
1214
1214
  }));
1215
- assistantMessages = commonMessages.map(function (_a) {
1215
+ assistantMessages = commonMessages
1216
+ .map(function (_a) {
1216
1217
  var tool_calls = _a.tool_calls, message = __rest(_a, ["tool_calls"]);
1217
1218
  return (__assign(__assign({}, message), { tool_calls: tool_calls === null || tool_calls === void 0 ? void 0 : tool_calls.filter(function (_a) {
1218
1219
  var id = _a.id;
1219
1220
  return assistantToolCallSet.has(id);
1220
1221
  }) }));
1222
+ })
1223
+ .filter(function (_a) {
1224
+ var content = _a.content, tool_calls = _a.tool_calls;
1225
+ return !!content || !!(tool_calls === null || tool_calls === void 0 ? void 0 : tool_calls.length);
1221
1226
  });
1222
1227
  promptMessages = [];
1223
1228
  {
package/build/index.mjs CHANGED
@@ -1210,12 +1210,17 @@ var ClientHistory = /** @class */ (function () {
1210
1210
  var tool_call_id = _a.tool_call_id;
1211
1211
  return tool_call_id;
1212
1212
  }));
1213
- assistantMessages = commonMessages.map(function (_a) {
1213
+ assistantMessages = commonMessages
1214
+ .map(function (_a) {
1214
1215
  var tool_calls = _a.tool_calls, message = __rest(_a, ["tool_calls"]);
1215
1216
  return (__assign(__assign({}, message), { tool_calls: tool_calls === null || tool_calls === void 0 ? void 0 : tool_calls.filter(function (_a) {
1216
1217
  var id = _a.id;
1217
1218
  return assistantToolCallSet.has(id);
1218
1219
  }) }));
1220
+ })
1221
+ .filter(function (_a) {
1222
+ var content = _a.content, tool_calls = _a.tool_calls;
1223
+ return !!content || !!(tool_calls === null || tool_calls === void 0 ? void 0 : tool_calls.length);
1219
1224
  });
1220
1225
  promptMessages = [];
1221
1226
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",