blun-king-cli 9.1.331 → 9.1.332
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/blun.mjs +9 -6
- package/package.json +1 -1
package/blun.mjs
CHANGED
|
@@ -244512,6 +244512,13 @@ function createStepEventGate(deps) {
|
|
|
244512
244512
|
queued.catch(() => {});
|
|
244513
244513
|
return queued;
|
|
244514
244514
|
};
|
|
244515
|
+
const inspectLiveRepetition = (delta) => {
|
|
244516
|
+
const repetition = liveRepetitionGuard?.push(delta) ?? null;
|
|
244517
|
+
if (repetition === null) return false;
|
|
244518
|
+
liveRepetitionResult = repetition;
|
|
244519
|
+
liveRepetitionController?.abort(/* @__PURE__ */ new Error("Repeated assistant text detected during streaming"));
|
|
244520
|
+
return true;
|
|
244521
|
+
};
|
|
244515
244522
|
return {
|
|
244516
244523
|
get hasOutput() {
|
|
244517
244524
|
return hasOutput;
|
|
@@ -244542,12 +244549,7 @@ function createStepEventGate(deps) {
|
|
|
244542
244549
|
drain: async () => eventQueue,
|
|
244543
244550
|
callbacks: {
|
|
244544
244551
|
onTextDelta: (delta) => {
|
|
244545
|
-
|
|
244546
|
-
if (repetition !== null) {
|
|
244547
|
-
liveRepetitionResult = repetition;
|
|
244548
|
-
liveRepetitionController?.abort(/* @__PURE__ */ new Error("Repeated assistant text detected during streaming"));
|
|
244549
|
-
return;
|
|
244550
|
-
}
|
|
244552
|
+
if (inspectLiveRepetition(delta)) return;
|
|
244551
244553
|
enqueue(() => {
|
|
244552
244554
|
dispatchEvent({
|
|
244553
244555
|
type: "text.delta",
|
|
@@ -244556,6 +244558,7 @@ function createStepEventGate(deps) {
|
|
|
244556
244558
|
});
|
|
244557
244559
|
},
|
|
244558
244560
|
onThinkDelta: (delta) => {
|
|
244561
|
+
if (inspectLiveRepetition(delta)) return;
|
|
244559
244562
|
enqueue(() => {
|
|
244560
244563
|
dispatchEvent({
|
|
244561
244564
|
type: "thinking.delta",
|