blun-king-cli 9.1.210 → 9.1.211
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 +2 -10
- package/package.json +1 -1
package/blun.mjs
CHANGED
|
@@ -418413,17 +418413,13 @@ function injectChannelEnvelope(host, envelope, preamble) {
|
|
|
418413
418413
|
host.displayContext?.(envelope.text, origin);
|
|
418414
418414
|
return "buffered";
|
|
418415
418415
|
}
|
|
418416
|
-
if (!host.canDeliver()) {
|
|
418417
|
-
host.reportUndeliverable(uiText("channelInjection.noActiveSession"));
|
|
418418
|
-
return "dropped";
|
|
418419
|
-
}
|
|
418420
418416
|
const modelParts = [...preamble.bufferedByChat?.get(envelope.meta.chat_id) ?? [], envelope.tag];
|
|
418421
418417
|
if (!preamble.sent && envelope.preamble !== void 0 && envelope.preamble.length > 0) {
|
|
418422
418418
|
modelParts.unshift(envelope.preamble);
|
|
418423
418419
|
preamble.sent = true;
|
|
418424
418420
|
}
|
|
418425
418421
|
const modelInput = modelParts.join("\n\n");
|
|
418426
|
-
if (host.isBusy()) {
|
|
418422
|
+
if (!host.canDeliver() || host.isBusy()) {
|
|
418427
418423
|
host.enqueue(modelInput, envelope.text, origin, contextOnly);
|
|
418428
418424
|
preamble.bufferedByChat?.delete(envelope.meta.chat_id);
|
|
418429
418425
|
return "queued";
|
|
@@ -516321,10 +516317,6 @@ var BlunTUI = class {
|
|
|
516321
516317
|
}, envelope, this.channelPreamble);
|
|
516322
516318
|
}
|
|
516323
516319
|
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
516320
|
const item = {
|
|
516329
516321
|
text: command.input,
|
|
516330
516322
|
displayText: command.displayText,
|
|
@@ -516335,7 +516327,7 @@ var BlunTUI = class {
|
|
|
516335
516327
|
channelAcknowledge: acknowledge,
|
|
516336
516328
|
telegramCommandName: command.name
|
|
516337
516329
|
};
|
|
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;
|
|
516330
|
+
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
516331
|
if (busy) {
|
|
516340
516332
|
this.state.queuedMessages.push(item);
|
|
516341
516333
|
this.track("input_queue", { kind: "channel-command" });
|