fleetbo-cockpit-cli 1.0.131 → 1.0.132

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/cli.js +20 -47
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -641,44 +641,6 @@ if (command === 'alex') {
641
641
 
642
642
  let inputBuffer = "";
643
643
  let isProcessing = false;
644
- let hintTimer = null;
645
- let submitTimer = null;
646
-
647
- const showHint = () => {
648
- if (hintTimer) clearTimeout(hintTimer);
649
- hintTimer = setTimeout(() => {
650
- hintTimer = null;
651
- if (inputBuffer.trim() !== "" && !isProcessing) {
652
- rl.setPrompt("\x1b[90m ↵ again to send\x1b[0m");
653
- rl.prompt();
654
- }
655
- }, 400);
656
- };
657
-
658
- const doSubmit = async () => {
659
- if (hintTimer) { clearTimeout(hintTimer); hintTimer = null; }
660
- if (submitTimer) { clearTimeout(submitTimer); submitTimer = null; }
661
- if (isProcessing || inputBuffer.trim() === "") return;
662
-
663
- const finalPrompt = inputBuffer.trim();
664
- inputBuffer = "";
665
-
666
- if (finalPrompt.length > 4000) {
667
- console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejected: Excessive size (${finalPrompt.length}/4000 characters).\x1b[0m`);
668
- rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
669
- rl.prompt();
670
- return;
671
- }
672
-
673
- isProcessing = true;
674
- rl.setPrompt("");
675
- await processAlexRequest(finalPrompt);
676
- isProcessing = false;
677
-
678
- console.log('');
679
- rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
680
- rl.prompt();
681
- };
682
644
 
683
645
  rl.on('line', async (line) => {
684
646
  if (isProcessing) return;
@@ -692,18 +654,29 @@ if (command === 'alex') {
692
654
  }
693
655
 
694
656
  if (trimmedLine !== "") {
695
- // Ligne non-vide : annule submit en attente (paste avec ligne vide interne)
696
- if (submitTimer) { clearTimeout(submitTimer); submitTimer = null; }
697
657
  inputBuffer += (inputBuffer ? "\n" : "") + line;
698
- // Hint affiché 400ms après la dernière ligne — jamais pendant un paste
699
- showHint();
658
+ rl.setPrompt("\x1b[90m ↵ again to send\x1b[0m");
659
+ rl.prompt();
700
660
  } else {
701
661
  if (inputBuffer.trim() !== "") {
702
- // Ligne vide : annule le hint, attend 400ms pour soumettre
703
- // Si une ligne non-vide arrive → submitTimer annulé (paste continue)
704
- if (hintTimer) { clearTimeout(hintTimer); hintTimer = null; }
705
- if (submitTimer) clearTimeout(submitTimer);
706
- submitTimer = setTimeout(() => doSubmit(), 400);
662
+ const finalPrompt = inputBuffer.trim();
663
+ inputBuffer = "";
664
+
665
+ if (finalPrompt.length > 4000) {
666
+ console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejected: Excessive size (${finalPrompt.length}/4000 characters).\x1b[0m`);
667
+ rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
668
+ rl.prompt();
669
+ return;
670
+ }
671
+
672
+ isProcessing = true;
673
+ rl.setPrompt("");
674
+ await processAlexRequest(finalPrompt);
675
+ isProcessing = false;
676
+
677
+ console.log('');
678
+ rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
679
+ rl.prompt();
707
680
  } else {
708
681
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
709
682
  rl.prompt();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.131",
3
+ "version": "1.0.132",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",