fleetbo-cockpit-cli 1.0.132 → 1.0.133

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 +26 -20
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -639,47 +639,53 @@ if (command === 'alex') {
639
639
  process.stdout.write('\n\x1b[F');
640
640
  rl.prompt();
641
641
 
642
- let inputBuffer = "";
643
- let isProcessing = false;
642
+ let inputBuffer = "";
643
+ let isProcessing = false;
644
644
 
645
645
  rl.on('line', async (line) => {
646
- if (isProcessing) return;
646
+ if (isProcessing) return;
647
647
 
648
648
  const trimmedLine = line.trim();
649
649
 
650
- if (['exit', 'quit'].includes(trimmedLine.toLowerCase())) {
650
+ if (['exit', 'quit'].includes(trimmedLine.toLowerCase())) {
651
651
  console.log('\n\x1b[90m Alex session closed.\x1b[0m');
652
- rl.close();
653
- return;
652
+ rl.close();
653
+ return;
654
654
  }
655
655
 
656
656
  if (trimmedLine !== "") {
657
+ const wasEmpty = inputBuffer === "";
657
658
  inputBuffer += (inputBuffer ? "\n" : "") + line;
658
- rl.setPrompt("\x1b[90m ↵ again to send\x1b[0m");
659
- rl.prompt();
660
- } else {
659
+ // Hint uniquement si c'était la première ligne (buffer vide avant)
660
+ // Pendant un paste, le buffer n'est jamais vide entre les lignes
661
+ if (wasEmpty) {
662
+ rl.setPrompt("\x1b[90m ↵ again to send\x1b[0m");
663
+ rl.prompt();
664
+ }
665
+ }
666
+ else {
661
667
  if (inputBuffer.trim() !== "") {
662
668
  const finalPrompt = inputBuffer.trim();
663
- inputBuffer = "";
664
-
669
+ inputBuffer = "";
670
+
665
671
  if (finalPrompt.length > 4000) {
666
672
  console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejected: Excessive size (${finalPrompt.length}/4000 characters).\x1b[0m`);
667
673
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
668
- rl.prompt();
669
- return;
674
+ rl.prompt();
675
+ return;
670
676
  }
671
677
 
672
- isProcessing = true;
673
- rl.setPrompt("");
678
+ isProcessing = true;
679
+ rl.setPrompt("");
674
680
  await processAlexRequest(finalPrompt);
675
- isProcessing = false;
676
-
677
- console.log('');
681
+ isProcessing = false;
682
+
683
+ console.log('');
678
684
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
679
- rl.prompt();
685
+ rl.prompt();
680
686
  } else {
681
687
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
682
- rl.prompt();
688
+ rl.prompt();
683
689
  }
684
690
  }
685
691
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.132",
3
+ "version": "1.0.133",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",