agent-swarm-kit 1.0.136 → 1.0.137
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 +4 -1
- package/build/index.mjs +4 -1
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -345,6 +345,9 @@ var validateDefault = function (output) { return __awaiter(void 0, void 0, void
|
|
|
345
345
|
}); };
|
|
346
346
|
|
|
347
347
|
var removeXmlTags = function (input) {
|
|
348
|
+
if (!input) {
|
|
349
|
+
return "";
|
|
350
|
+
}
|
|
348
351
|
return input
|
|
349
352
|
.replace(/<[^>]+>[\s\S]*?<\/[^>]+>/g, '')
|
|
350
353
|
.replace(/\n\s*\n/g, '\n')
|
|
@@ -2372,7 +2375,7 @@ var ClientAgent = /** @class */ (function () {
|
|
|
2372
2375
|
output = _d.sent();
|
|
2373
2376
|
((_b = this.params.completion.callbacks) === null || _b === void 0 ? void 0 : _b.onComplete) &&
|
|
2374
2377
|
((_c = this.params.completion.callbacks) === null || _c === void 0 ? void 0 : _c.onComplete(args, output));
|
|
2375
|
-
return [2 /*return*/, output];
|
|
2378
|
+
return [2 /*return*/, __assign(__assign({}, output), { content: output.content || "" })];
|
|
2376
2379
|
}
|
|
2377
2380
|
});
|
|
2378
2381
|
});
|
package/build/index.mjs
CHANGED
|
@@ -343,6 +343,9 @@ var validateDefault = function (output) { return __awaiter(void 0, void 0, void
|
|
|
343
343
|
}); };
|
|
344
344
|
|
|
345
345
|
var removeXmlTags = function (input) {
|
|
346
|
+
if (!input) {
|
|
347
|
+
return "";
|
|
348
|
+
}
|
|
346
349
|
return input
|
|
347
350
|
.replace(/<[^>]+>[\s\S]*?<\/[^>]+>/g, '')
|
|
348
351
|
.replace(/\n\s*\n/g, '\n')
|
|
@@ -2370,7 +2373,7 @@ var ClientAgent = /** @class */ (function () {
|
|
|
2370
2373
|
output = _d.sent();
|
|
2371
2374
|
((_b = this.params.completion.callbacks) === null || _b === void 0 ? void 0 : _b.onComplete) &&
|
|
2372
2375
|
((_c = this.params.completion.callbacks) === null || _c === void 0 ? void 0 : _c.onComplete(args, output));
|
|
2373
|
-
return [2 /*return*/, output];
|
|
2376
|
+
return [2 /*return*/, __assign(__assign({}, output), { content: output.content || "" })];
|
|
2374
2377
|
}
|
|
2375
2378
|
});
|
|
2376
2379
|
});
|