billion-context 0.1.71-pr.469.284 → 0.1.71
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/index.js +3 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50241,9 +50241,6 @@ var RENDER_TAG_DETECT = /\x3c\/?acp(?=[\s>])|\\u003c\/?acp(?=[\s>\\])/;
|
|
|
50241
50241
|
function containsRenderTagText(s3) {
|
|
50242
50242
|
return RENDER_TAG_DETECT.test(s3);
|
|
50243
50243
|
}
|
|
50244
|
-
function mayStartRenderTag(s3) {
|
|
50245
|
-
return RENDER_TAG_DETECT.test(s3) || PARTIAL_TAIL.test(s3);
|
|
50246
|
-
}
|
|
50247
50244
|
var TOOL_CALL_XML = /\x3c\/?(?:antml:)?(invoke|tool_calls|tool_call|parameter|parameters)\b[^<>]*\x3e|\\u003c\/?(?:antml:)?(invoke|tool_calls|tool_call|parameter|parameters)\b|\x3c\/?antml:[a-z_]+/i;
|
|
50248
50245
|
function containsToolCallXmlFragment(s3) {
|
|
50249
50246
|
return TOOL_CALL_XML.test(s3);
|
|
@@ -54295,7 +54292,7 @@ data: ${JSON.stringify({ type: "content_block_delta", index, delta: { type: delt
|
|
|
54295
54292
|
const v2 = dd[field];
|
|
54296
54293
|
if (typeof v2 !== "string") continue;
|
|
54297
54294
|
hadText = true;
|
|
54298
|
-
if (!
|
|
54295
|
+
if (!containsRenderTagText(v2) && !anyPending()) continue;
|
|
54299
54296
|
const index = typeof ch?.["index"] === "number" ? ch["index"] : ci2;
|
|
54300
54297
|
const [clean, changed] = pushField(field, index, v2);
|
|
54301
54298
|
if (clean.length === 0) droppedText = true;
|
|
@@ -54327,7 +54324,7 @@ data: ${JSON.stringify({ type: "content_block_delta", index, delta: { type: delt
|
|
|
54327
54324
|
return rawEvent + "\n\n";
|
|
54328
54325
|
}
|
|
54329
54326
|
const raw = d[field];
|
|
54330
|
-
if (!
|
|
54327
|
+
if (!containsRenderTagText(raw) && !anyPending()) {
|
|
54331
54328
|
return rawEvent + "\n\n";
|
|
54332
54329
|
}
|
|
54333
54330
|
const [clean, changed] = pushField(field, index, raw);
|
|
@@ -54456,7 +54453,7 @@ async function pipePluginResponsesWithStrip(stream2, res, session, log2) {
|
|
|
54456
54453
|
await write(rawEvent + "\n\n");
|
|
54457
54454
|
continue;
|
|
54458
54455
|
}
|
|
54459
|
-
if (!
|
|
54456
|
+
if (!containsRenderTagText(delta) && !tagFilter.pending()) {
|
|
54460
54457
|
await write(rawEvent + "\n\n");
|
|
54461
54458
|
continue;
|
|
54462
54459
|
}
|