fleetbo-cockpit-cli 1.0.101 → 1.0.102

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 +17 -1
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -274,6 +274,7 @@ if (command === 'alex') {
274
274
  }
275
275
 
276
276
  console.log('\x1b[33m🧠 Alex is thinking...\x1b[0m');
277
+ let spinnerTimer;
277
278
 
278
279
  try {
279
280
  // --- MEMORY SYSTEM (SMART CACHE SCANNER V3 - SOUVERAINETÉ DU MÉTAL) ---
@@ -295,7 +296,7 @@ if (command === 'alex') {
295
296
  modName = modName.replace('Schema', '');
296
297
  }
297
298
 
298
- process.stdout.write(` \x1b[90m🔍 Checking OS cache & local files for ${modName}...\x1b[0m`);
299
+ process.stdout.write(` \x1b[90m🔍 Checking Alex memory for ${modName} module...\x1b[0m`);
299
300
  const cache = await getModuleCache({ projectId, moduleName: modName });
300
301
 
301
302
  // 💡 LECTURE LOCALE DU VRAI CODE KOTLIN (La Vérité Absolue)
@@ -355,10 +356,22 @@ if (command === 'alex') {
355
356
 
356
357
  const promptWithTime = prompt + `\n\n[SYSTEM INFO: The exact current timestamp is ${exactTime}. Use it STRICTLY for your signature '// ⚡ Forged by Alex on...' at the bottom of your files.]`;
357
358
 
359
+ // 🟢 DÉMARRAGE DE L'ANIMATION DU CURSEUR
360
+ const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
361
+ let spinnerIdx = 0;
362
+ spinnerTimer = setInterval(() => {
363
+ process.stdout.write(`\r \x1b[36m${spinnerFrames[spinnerIdx]}\x1b[0m \x1b[90mAlex is forging...\x1b[0m`);
364
+ spinnerIdx = (spinnerIdx + 1) % spinnerFrames.length;
365
+ }, 80);
366
+
358
367
  const result = await axios.post(ALEX_ENGINE_URL, { prompt: promptWithTime, projectType: 'android' }, {
359
368
  headers: { 'x-project-id': projectId }
360
369
  });
361
370
 
371
+ // 🛑 ARRÊT DE L'ANIMATION
372
+ clearInterval(spinnerTimer);
373
+ process.stdout.write('\r' + ' '.repeat(80) + '\r'); // Nettoie la ligne de l'animation
374
+
362
375
  let aiData = result.data;
363
376
 
364
377
  // 🛡️ ROBUST PARSER: Unwrap all nesting levels until we find a valid aiData object
@@ -504,6 +517,9 @@ if (command === 'alex') {
504
517
  console.log(`\n\x1b[31m⚠️ Error: Alex replied, but source code could not be extracted. Try the command again.\x1b[0m\n`);
505
518
  }
506
519
  } catch (error) {
520
+ // 🛑 SÉCURITÉ : Arrête le spinner s'il y a un crash
521
+ if (spinnerTimer) clearInterval(spinnerTimer);
522
+
507
523
  process.stdout.write('\r' + ' '.repeat(50) + '\r');
508
524
  console.error('\n\x1b[31m Alex Error:\x1b[0m ' + (error.response?.data?.message || error.message));
509
525
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.101",
3
+ "version": "1.0.102",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",