blun-king-cli 2.6.2 → 2.7.0
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/blun.js +15 -3
- package/package.json +1 -1
package/bin/blun.js
CHANGED
|
@@ -2600,7 +2600,13 @@ async function main() {
|
|
|
2600
2600
|
return null;
|
|
2601
2601
|
}
|
|
2602
2602
|
|
|
2603
|
+
var inputQueue = [];
|
|
2604
|
+
|
|
2603
2605
|
async function processInput(input) {
|
|
2606
|
+
if (processing) {
|
|
2607
|
+
inputQueue.push(input);
|
|
2608
|
+
return;
|
|
2609
|
+
}
|
|
2604
2610
|
processing = true;
|
|
2605
2611
|
eraseUI();
|
|
2606
2612
|
|
|
@@ -2637,8 +2643,16 @@ async function main() {
|
|
|
2637
2643
|
inputBuffer = "";
|
|
2638
2644
|
cursorPos = 0;
|
|
2639
2645
|
menuSelected = 0;
|
|
2646
|
+
uiStartRow = -1;
|
|
2640
2647
|
processing = false;
|
|
2641
2648
|
drawPrompt();
|
|
2649
|
+
|
|
2650
|
+
// Process queued inputs
|
|
2651
|
+
if (inputQueue.length > 0) {
|
|
2652
|
+
var next = inputQueue.shift();
|
|
2653
|
+
inputHistory.unshift(next);
|
|
2654
|
+
processInput(next);
|
|
2655
|
+
}
|
|
2642
2656
|
}
|
|
2643
2657
|
|
|
2644
2658
|
// ── Raw Input Handler ──
|
|
@@ -2649,9 +2663,7 @@ async function main() {
|
|
|
2649
2663
|
drawPrompt();
|
|
2650
2664
|
|
|
2651
2665
|
process.stdin.on("data", function(key) {
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
// Ctrl+C / Ctrl+D — exit
|
|
2666
|
+
// Ctrl+C / Ctrl+D — always allow exit
|
|
2655
2667
|
if (key === "\x03" || key === "\x04") {
|
|
2656
2668
|
session.history = chatHistory.slice(-50);
|
|
2657
2669
|
saveSessionHistory(session);
|