blun-king-cli 9.1.210 → 9.1.212
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 +4 -11
- package/package.json +1 -1
package/blun.mjs
CHANGED
|
@@ -79266,7 +79266,8 @@ var init_error_memory$1 = __esmMin((() => {
|
|
|
79266
79266
|
if (!patterns || patterns.length === 0) return void 0;
|
|
79267
79267
|
try {
|
|
79268
79268
|
const { buildCompactErrorMemoryReminder, selectRelevantErrorMemoryPatterns } = createRequire(import.meta.url)("./bin/error-memory-performance-policy.cjs");
|
|
79269
|
-
const { recentUserText } = createRequire(import.meta.url)("./bin/mistake-relevance-policy.cjs");
|
|
79269
|
+
const { isLowInformationMistakeTurn, recentUserText } = createRequire(import.meta.url)("./bin/mistake-relevance-policy.cjs");
|
|
79270
|
+
if (isLowInformationMistakeTurn(this.agent.context.history)) return void 0;
|
|
79270
79271
|
return buildCompactErrorMemoryReminder(selectRelevantErrorMemoryPatterns(patterns, recentUserText(this.agent.context.history)));
|
|
79271
79272
|
} catch {}
|
|
79272
79273
|
return buildErrorMemoryReminder(patterns);
|
|
@@ -418413,17 +418414,13 @@ function injectChannelEnvelope(host, envelope, preamble) {
|
|
|
418413
418414
|
host.displayContext?.(envelope.text, origin);
|
|
418414
418415
|
return "buffered";
|
|
418415
418416
|
}
|
|
418416
|
-
if (!host.canDeliver()) {
|
|
418417
|
-
host.reportUndeliverable(uiText("channelInjection.noActiveSession"));
|
|
418418
|
-
return "dropped";
|
|
418419
|
-
}
|
|
418420
418417
|
const modelParts = [...preamble.bufferedByChat?.get(envelope.meta.chat_id) ?? [], envelope.tag];
|
|
418421
418418
|
if (!preamble.sent && envelope.preamble !== void 0 && envelope.preamble.length > 0) {
|
|
418422
418419
|
modelParts.unshift(envelope.preamble);
|
|
418423
418420
|
preamble.sent = true;
|
|
418424
418421
|
}
|
|
418425
418422
|
const modelInput = modelParts.join("\n\n");
|
|
418426
|
-
if (host.isBusy()) {
|
|
418423
|
+
if (!host.canDeliver() || host.isBusy()) {
|
|
418427
418424
|
host.enqueue(modelInput, envelope.text, origin, contextOnly);
|
|
418428
418425
|
preamble.bufferedByChat?.delete(envelope.meta.chat_id);
|
|
418429
418426
|
return "queued";
|
|
@@ -516321,10 +516318,6 @@ var BlunTUI = class {
|
|
|
516321
516318
|
}, envelope, this.channelPreamble);
|
|
516322
516319
|
}
|
|
516323
516320
|
injectTelegramRemoteCommand(envelope, command, acknowledge) {
|
|
516324
|
-
if (this.session === void 0 || this.state.appState.model.trim().length === 0) {
|
|
516325
|
-
this.showStatus(uiText("channelInjection.noActiveSession"), "warning");
|
|
516326
|
-
return;
|
|
516327
|
-
}
|
|
516328
516321
|
const item = {
|
|
516329
516322
|
text: command.input,
|
|
516330
516323
|
displayText: command.displayText,
|
|
@@ -516335,7 +516328,7 @@ var BlunTUI = class {
|
|
|
516335
516328
|
channelAcknowledge: acknowledge,
|
|
516336
516329
|
telegramCommandName: command.name
|
|
516337
516330
|
};
|
|
516338
|
-
const busy = this.state.queuedMessages.length > 0 || this.queueSteerInFlight !== void 0 || this.pendingChannelReplyGuard !== void 0 || this.deferUserMessages || this.streamingUI.hasActiveTurn() || this.state.appState.streamingPhase !== "idle" || this.state.appState.isCompacting;
|
|
516331
|
+
const busy = this.session === void 0 || this.state.appState.model.trim().length === 0 || this.state.queuedMessages.length > 0 || this.queueSteerInFlight !== void 0 || this.pendingChannelReplyGuard !== void 0 || this.deferUserMessages || this.streamingUI.hasActiveTurn() || this.state.appState.streamingPhase !== "idle" || this.state.appState.isCompacting;
|
|
516339
516332
|
if (busy) {
|
|
516340
516333
|
this.state.queuedMessages.push(item);
|
|
516341
516334
|
this.track("input_queue", { kind: "channel-command" });
|