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.
Files changed (2) hide show
  1. package/bin/blun.js +15 -4
  2. 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; // reset so drawUI doesn't try to erase old content
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
- if (processing) return;
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "2.6.3",
3
+ "version": "2.7.0",
4
4
  "description": "BLUN King CLI — Premium KI Console",
5
5
  "bin": {
6
6
  "blun": "./bin/blun.js"