blun-king-cli 9.1.63 → 9.1.65
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/bin/provider-idle-timeout-policy.cjs +1 -1
- package/blun.mjs +23 -5
- package/package.json +1 -1
package/blun.mjs
CHANGED
|
@@ -406444,6 +406444,8 @@ var TUI = class TUI extends Container {
|
|
|
406444
406444
|
firstChanged = expandedRange.firstChanged;
|
|
406445
406445
|
lastChanged = expandedRange.lastChanged;
|
|
406446
406446
|
}
|
|
406447
|
+
const viewportAnchored = newLines.length === height && this.previousLines.length === height && prevViewportTop === 0;
|
|
406448
|
+
if (viewportAnchored && cursorPos !== null && firstChanged > cursorPos.row) firstChanged = Math.min(firstChanged, cursorPos.row);
|
|
406447
406449
|
const appendStart = appendedLines && firstChanged === this.previousLines.length && firstChanged > 0;
|
|
406448
406450
|
if (firstChanged === -1) {
|
|
406449
406451
|
this.positionHardwareCursor(cursorPos, newLines.length);
|
|
@@ -406511,10 +406513,16 @@ var TUI = class TUI extends Container {
|
|
|
406511
406513
|
viewportTop += scroll;
|
|
406512
406514
|
hardwareCursorRow = moveTargetRow;
|
|
406513
406515
|
}
|
|
406514
|
-
|
|
406515
|
-
if (
|
|
406516
|
-
|
|
406517
|
-
|
|
406516
|
+
let lineDiff = 0;
|
|
406517
|
+
if (viewportAnchored) {
|
|
406518
|
+
buffer += `\x1b[${moveTargetRow - viewportTop + 1};1H`;
|
|
406519
|
+
hardwareCursorRow = moveTargetRow;
|
|
406520
|
+
} else {
|
|
406521
|
+
lineDiff = computeLineDiff(moveTargetRow);
|
|
406522
|
+
if (lineDiff > 0) buffer += `\x1b[${lineDiff}B`;
|
|
406523
|
+
else if (lineDiff < 0) buffer += `\x1b[${-lineDiff}A`;
|
|
406524
|
+
buffer += appendStart ? "\r\n" : "\r";
|
|
406525
|
+
}
|
|
406518
406526
|
const renderEnd = Math.min(lastChanged, newLines.length - 1);
|
|
406519
406527
|
for (let i = firstChanged; i <= renderEnd; i++) {
|
|
406520
406528
|
if (i > firstChanged) buffer += "\r\n";
|
|
@@ -502359,6 +502367,11 @@ var EditorKeyboardController = class {
|
|
|
502359
502367
|
cancel();
|
|
502360
502368
|
return;
|
|
502361
502369
|
}
|
|
502370
|
+
if (host.state.appState.isCompacting && host.streamingUI.hasActiveTurn()) {
|
|
502371
|
+
this.clearPendingExit();
|
|
502372
|
+
this.cancelCurrentStream();
|
|
502373
|
+
return;
|
|
502374
|
+
}
|
|
502362
502375
|
if (host.state.appState.isCompacting) {
|
|
502363
502376
|
this.clearPendingExit();
|
|
502364
502377
|
this.cancelCurrentCompaction();
|
|
@@ -502407,6 +502420,11 @@ var EditorKeyboardController = class {
|
|
|
502407
502420
|
this.clearPendingUndoEsc();
|
|
502408
502421
|
return;
|
|
502409
502422
|
}
|
|
502423
|
+
if (host.state.appState.isCompacting && host.streamingUI.hasActiveTurn()) {
|
|
502424
|
+
this.cancelCurrentStream();
|
|
502425
|
+
this.clearPendingUndoEsc();
|
|
502426
|
+
return;
|
|
502427
|
+
}
|
|
502410
502428
|
if (host.state.appState.isCompacting) {
|
|
502411
502429
|
this.cancelCurrentCompaction();
|
|
502412
502430
|
this.clearPendingUndoEsc();
|
|
@@ -512100,7 +512118,7 @@ function createTUIState(options) {
|
|
|
512100
512118
|
const quotaWarningContainer = new GutterContainer(1, 1);
|
|
512101
512119
|
const quotaWarning = new ManagedQuotaWarningComponent();
|
|
512102
512120
|
quotaWarningContainer.addChild(quotaWarning);
|
|
512103
|
-
const loopIndicatorContainer = new GutterContainer(
|
|
512121
|
+
const loopIndicatorContainer = new GutterContainer(5, 1);
|
|
512104
512122
|
const loopIndicator = new LoopChatIndicatorComponent(appState, () => {
|
|
512105
512123
|
ui.requestRender();
|
|
512106
512124
|
});
|