blun-king-cli 9.1.311 → 9.1.313
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 +35 -7
- package/package.json +1 -1
package/blun.mjs
CHANGED
|
@@ -515893,6 +515893,7 @@ var BlunTUI = class {
|
|
|
515893
515893
|
signalCleanupHandlers = [];
|
|
515894
515894
|
isShuttingDown = false;
|
|
515895
515895
|
startupNotice;
|
|
515896
|
+
startupTranscriptNotice;
|
|
515896
515897
|
onStartupNoticeShown;
|
|
515897
515898
|
startupLoginRequired = false;
|
|
515898
515899
|
startupWorkspaceSelectionPending = false;
|
|
@@ -515969,6 +515970,7 @@ var BlunTUI = class {
|
|
|
515969
515970
|
};
|
|
515970
515971
|
this.options = tuiOptions;
|
|
515971
515972
|
this.startupNotice = invalidAppearance ? combineStartupNotice(startupInput.startupNotice, new TuiConfigParseError(DEFAULT_TUI_CONFIG).message) : startupInput.startupNotice;
|
|
515973
|
+
this.startupTranscriptNotice = startupInput.startupTranscriptNotice;
|
|
515972
515974
|
this.onStartupNoticeShown = startupInput.onStartupNoticeShown;
|
|
515973
515975
|
this.state = createTUIState(tuiOptions);
|
|
515974
515976
|
this.state.loopIndicator.setRefreshHandler(() => {
|
|
@@ -516264,6 +516266,7 @@ var BlunTUI = class {
|
|
|
516264
516266
|
this.showTmuxKeyboardWarningIfNeeded();
|
|
516265
516267
|
this.startTelegramChannel();
|
|
516266
516268
|
if (this.state.startupState === "picker") {
|
|
516269
|
+
await this.flushStartupTranscriptNotice();
|
|
516267
516270
|
this.bootstrapFromPicker();
|
|
516268
516271
|
return;
|
|
516269
516272
|
}
|
|
@@ -516280,9 +516283,10 @@ var BlunTUI = class {
|
|
|
516280
516283
|
if (!continuedAfterUpdate) await this.promptStartupResumeGoalIfNeeded();
|
|
516281
516284
|
if (this.aborted) return;
|
|
516282
516285
|
}
|
|
516283
|
-
|
|
516284
|
-
|
|
516285
|
-
|
|
516286
|
+
this.showSessionWarnings(this.session);
|
|
516287
|
+
}
|
|
516288
|
+
await this.flushStartupTranscriptNotice();
|
|
516289
|
+
this.fetchSessions();
|
|
516286
516290
|
if (this.session !== void 0) this.updateTerminalTitle();
|
|
516287
516291
|
this.refreshSkillCommands(this.session);
|
|
516288
516292
|
this.refreshPluginCommands(this.session);
|
|
@@ -516291,11 +516295,25 @@ var BlunTUI = class {
|
|
|
516291
516295
|
if (this.startupNotice !== void 0) {
|
|
516292
516296
|
this.showStatus(this.startupNotice);
|
|
516293
516297
|
this.startupNotice = void 0;
|
|
516294
|
-
const onShown = this.onStartupNoticeShown;
|
|
516295
|
-
this.onStartupNoticeShown = void 0;
|
|
516296
|
-
await onShown?.().catch(() => {});
|
|
516297
516298
|
}
|
|
516298
516299
|
}
|
|
516300
|
+
async flushStartupTranscriptNotice() {
|
|
516301
|
+
const notice = this.startupTranscriptNotice?.trimEnd();
|
|
516302
|
+
this.startupTranscriptNotice = void 0;
|
|
516303
|
+
if (notice !== void 0 && notice.length > 0) {
|
|
516304
|
+
const [content, ...detailLines] = notice.split("\n");
|
|
516305
|
+
this.appendTranscriptEntry({
|
|
516306
|
+
id: nextTranscriptId(),
|
|
516307
|
+
kind: "status",
|
|
516308
|
+
renderMode: "notice",
|
|
516309
|
+
content,
|
|
516310
|
+
...(detailLines.length === 0 ? {} : { detail: detailLines.join("\n") })
|
|
516311
|
+
});
|
|
516312
|
+
}
|
|
516313
|
+
const onShown = this.onStartupNoticeShown;
|
|
516314
|
+
this.onStartupNoticeShown = void 0;
|
|
516315
|
+
await onShown?.().catch(() => {});
|
|
516316
|
+
}
|
|
516299
516317
|
async showSessionWarnings(session) {
|
|
516300
516318
|
try {
|
|
516301
516319
|
const warnings = await session.getSessionWarnings();
|
|
@@ -517064,6 +517082,16 @@ var BlunTUI = class {
|
|
|
517064
517082
|
channelAcknowledge: acknowledge,
|
|
517065
517083
|
telegramCommandName: command.name
|
|
517066
517084
|
};
|
|
517085
|
+
const phase = this.state.appState.streamingPhase;
|
|
517086
|
+
const activeTurn = this.streamingUI?.hasActiveTurn?.() === true || typeof phase === "string" && phase !== "idle" || this.state.appState.isCompacting === true;
|
|
517087
|
+
if (command.name === "reload" && activeTurn && !this.queueCommandRunning) {
|
|
517088
|
+
this.state.queuedMessages.unshift(item);
|
|
517089
|
+
this.session?.cancel();
|
|
517090
|
+
this.track("input_queue", { kind: "channel-command-preemptive" });
|
|
517091
|
+
this.updateQueueDisplay();
|
|
517092
|
+
this.state.ui.requestRender();
|
|
517093
|
+
return;
|
|
517094
|
+
}
|
|
517067
517095
|
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;
|
|
517068
517096
|
if (busy) {
|
|
517069
517097
|
this.state.queuedMessages.push(item);
|
|
@@ -519120,7 +519148,6 @@ async function runShell(opts, version, updateStartupNotice) {
|
|
|
519120
519148
|
}
|
|
519121
519149
|
if (updateStartupNotice !== void 0) {
|
|
519122
519150
|
updateNoticeText = renderUpdateSuccessNotice(updateStartupNotice.details, resolveUiLocale(tuiConfig.uiLocale));
|
|
519123
|
-
configWarning = combineStartupNotice(configWarning, updateNoticeText);
|
|
519124
519151
|
}
|
|
519125
519152
|
const palette = await getColorPalette(tuiConfig.theme);
|
|
519126
519153
|
currentTheme.setPalette(palette);
|
|
@@ -519170,6 +519197,7 @@ async function runShell(opts, version, updateStartupNotice) {
|
|
|
519170
519197
|
version,
|
|
519171
519198
|
workDir,
|
|
519172
519199
|
startupNotice: configWarning,
|
|
519200
|
+
startupTranscriptNotice: updateNoticeText,
|
|
519173
519201
|
onStartupNoticeShown: updateStartupNotice === void 0 || updateNoticeText === void 0 ? void 0 : async () => {
|
|
519174
519202
|
const delivery = await sendTelegramUpdateNotice(updateNoticeText, { version: updateStartupNotice.details.version });
|
|
519175
519203
|
if (!delivery.configured || delivery.attempted === 0 || delivery.sent === delivery.attempted) await updateStartupNotice.acknowledge();
|