fleetbo-cockpit-cli 1.0.136 → 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 -24
  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,37 +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 → écrit le hint dans le PTY (visible par Xterm)
665
- hintShown = true;
666
- process.stdout.write('\x1b[90m ↵ again to send\x1b[0m\n');
667
- } else {
668
- // 2ème ligne vide → soumet
669
- hintShown = false;
670
- const finalPrompt = inputBuffer.trim();
671
- inputBuffer = "";
672
-
673
- if (finalPrompt.length > 4000) {
674
- console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejected: Excessive size (${finalPrompt.length}/4000 characters).\x1b[0m`);
675
- rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
676
- rl.prompt();
677
- return;
678
- }
679
-
680
- isProcessing = true;
681
- rl.setPrompt("");
682
- await processAlexRequest(finalPrompt);
683
- isProcessing = false;
664
+ // 🟢 MAGIE : ON SOUMET IMMÉDIATEMENT ! Plus besoin d'attendre 2 fois.
665
+ const finalPrompt = inputBuffer.trim();
666
+ inputBuffer = "";
684
667
 
685
- 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`);
686
670
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
687
671
  rl.prompt();
672
+ return;
688
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();
689
683
  } else {
690
684
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
691
685
  rl.prompt();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.136",
3
+ "version": "1.0.137",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",