fleetbo-cockpit-cli 1.0.135 → 1.0.137

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 +18 -25
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -641,7 +641,7 @@ if (command === 'alex') {
641
641
 
642
642
  let inputBuffer = "";
643
643
  let isProcessing = false;
644
- let hintShown = false;
644
+ //let hintShown = false;
645
645
 
646
646
  rl.on('line', async (line) => {
647
647
  if (isProcessing) return;
@@ -655,38 +655,31 @@ if (command === 'alex') {
655
655
  }
656
656
 
657
657
  if (trimmedLine !== "") {
658
- // Accumule silencieusement pas de hint pendant la frappe/paste
658
+ // On accumule le texte si la ligne n'est pas vide
659
659
  inputBuffer += (inputBuffer ? "\n" : "") + line;
660
660
  }
661
661
  else {
662
+ // Si la ligne est vide (L'utilisateur a fait Entrée sans écrire de texte)
662
663
  if (inputBuffer.trim() !== "") {
663
- if (!hintShown) {
664
- // 1ère ligne vide → affiche le hint, attend la 2ème
665
- hintShown = true;
666
- rl.setPrompt("\x1b[90m ↵ again to send\x1b[0m");
667
- rl.prompt();
668
- } else {
669
- // 2ème ligne vide → soumet
670
- hintShown = false;
671
- const finalPrompt = inputBuffer.trim();
672
- inputBuffer = "";
673
-
674
- if (finalPrompt.length > 4000) {
675
- console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejected: Excessive size (${finalPrompt.length}/4000 characters).\x1b[0m`);
676
- rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
677
- rl.prompt();
678
- return;
679
- }
680
-
681
- isProcessing = true;
682
- rl.setPrompt("");
683
- await processAlexRequest(finalPrompt);
684
- isProcessing = false;
664
+ // 🟢 MAGIE : ON SOUMET IMMÉDIATEMENT ! Plus besoin d'attendre 2 fois.
665
+ const finalPrompt = inputBuffer.trim();
666
+ inputBuffer = "";
685
667
 
686
- console.log('');
668
+ if (finalPrompt.length > 4000) {
669
+ console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejected: Excessive size (${finalPrompt.length}/4000 characters).\x1b[0m`);
687
670
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
688
671
  rl.prompt();
672
+ return;
689
673
  }
674
+
675
+ isProcessing = true;
676
+ rl.setPrompt("");
677
+ await processAlexRequest(finalPrompt);
678
+ isProcessing = false;
679
+
680
+ console.log('');
681
+ rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
682
+ rl.prompt();
690
683
  } else {
691
684
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
692
685
  rl.prompt();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.135",
3
+ "version": "1.0.137",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",