blun-king-cli 2.6.3 → 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 -4
- 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,9 +2643,16 @@ async function main() {
|
|
|
2637
2643
|
inputBuffer = "";
|
|
2638
2644
|
cursorPos = 0;
|
|
2639
2645
|
menuSelected = 0;
|
|
2640
|
-
uiStartRow = -1;
|
|
2646
|
+
uiStartRow = -1;
|
|
2641
2647
|
processing = false;
|
|
2642
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
|
+
}
|
|
2643
2656
|
}
|
|
2644
2657
|
|
|
2645
2658
|
// ── Raw Input Handler ──
|
|
@@ -2650,9 +2663,7 @@ async function main() {
|
|
|
2650
2663
|
drawPrompt();
|
|
2651
2664
|
|
|
2652
2665
|
process.stdin.on("data", function(key) {
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
// Ctrl+C / Ctrl+D — exit
|
|
2666
|
+
// Ctrl+C / Ctrl+D — always allow exit
|
|
2656
2667
|
if (key === "\x03" || key === "\x04") {
|
|
2657
2668
|
session.history = chatHistory.slice(-50);
|
|
2658
2669
|
saveSessionHistory(session);
|