@agentv/core 4.12.7 → 4.12.8-next.1
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/dist/{chunk-5POFMJJ7.js → chunk-SWLNU3I6.js} +2 -2
- package/dist/chunk-SWLNU3I6.js.map +1 -0
- package/dist/evaluation/validation/index.cjs.map +1 -1
- package/dist/evaluation/validation/index.js +1 -1
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-5POFMJJ7.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2024,7 +2024,7 @@ function isTestMessage(value) {
|
|
|
2024
2024
|
if (typeof candidate.content === "string") {
|
|
2025
2025
|
return true;
|
|
2026
2026
|
}
|
|
2027
|
-
if (Array.isArray(candidate.content) && candidate.content.every(isJsonObject)) {
|
|
2027
|
+
if (Array.isArray(candidate.content) && candidate.content.every((item) => typeof item === "string" || isJsonObject(item))) {
|
|
2028
2028
|
return true;
|
|
2029
2029
|
}
|
|
2030
2030
|
if (Array.isArray(candidate.tool_calls) && candidate.tool_calls.length > 0) {
|
|
@@ -2224,6 +2224,12 @@ function extractContentSegments(content) {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
const segments = [];
|
|
2226
2226
|
for (const segment of content) {
|
|
2227
|
+
if (typeof segment === "string") {
|
|
2228
|
+
if (segment.trim().length > 0) {
|
|
2229
|
+
segments.push({ type: "text", value: segment });
|
|
2230
|
+
}
|
|
2231
|
+
continue;
|
|
2232
|
+
}
|
|
2227
2233
|
if (!isJsonObject(segment)) {
|
|
2228
2234
|
continue;
|
|
2229
2235
|
}
|
|
@@ -4968,6 +4974,15 @@ async function processMessages(options) {
|
|
|
4968
4974
|
}
|
|
4969
4975
|
const processedContent = [];
|
|
4970
4976
|
for (const rawSegment of content) {
|
|
4977
|
+
if (typeof rawSegment === "string") {
|
|
4978
|
+
if (rawSegment.length > 0) {
|
|
4979
|
+
processedContent.push({ type: "text", value: rawSegment });
|
|
4980
|
+
if (textParts) {
|
|
4981
|
+
textParts.push(rawSegment);
|
|
4982
|
+
}
|
|
4983
|
+
}
|
|
4984
|
+
continue;
|
|
4985
|
+
}
|
|
4971
4986
|
if (!isJsonObject(rawSegment)) {
|
|
4972
4987
|
continue;
|
|
4973
4988
|
}
|
|
@@ -5087,6 +5102,12 @@ async function processExpectedMessages(options) {
|
|
|
5087
5102
|
} else if (Array.isArray(content)) {
|
|
5088
5103
|
const processedContent = [];
|
|
5089
5104
|
for (const rawSegment of content) {
|
|
5105
|
+
if (typeof rawSegment === "string") {
|
|
5106
|
+
if (rawSegment.length > 0) {
|
|
5107
|
+
processedContent.push({ type: "text", value: rawSegment });
|
|
5108
|
+
}
|
|
5109
|
+
continue;
|
|
5110
|
+
}
|
|
5090
5111
|
if (!isJsonObject(rawSegment)) {
|
|
5091
5112
|
continue;
|
|
5092
5113
|
}
|