create-fleetbo-project 1.2.51 → 1.2.53

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.
@@ -113,6 +113,21 @@ if (command === 'alex') {
113
113
  console.log(\`\\x1b[36m Energy:\\x1b[0m \${energyColor}\${percent}%\\x1b[0m (\${remaining}/\${limit} tokens left)\`);
114
114
  }
115
115
  }
116
+
117
+ if (aiData.status === 'success' || aiData.status === 'message') {
118
+ console.log('');
119
+ console.log(\`\\x1b[32mAlex ❯\\x1b[0m \${aiData.message || "I'm ready."}\`);
120
+
121
+ if (aiData.remainingTokens !== undefined) {
122
+ const remaining = aiData.remainingTokens;
123
+ const limit = aiData.limit; // Récupération dynamique de la limite
124
+ const tierLabel = aiData.tier === 'senior' ? 'SENIOR' : 'STARTER';
125
+ const percent = Math.round((remaining / limit) * 100);
126
+ const energyColor = percent > 20 ? '\x1b[32m' : '\x1b[31m';
127
+ console.log(\`\\x1b[36m Energy:\\x1b[0m \${energyColor}\${percent}%\\x1b[0m (\${remaining}/\${limit} tokens left)\`);
128
+ }
129
+ }
130
+
116
131
  if (aiData.status === 'success' && aiData.moduleData) {
117
132
  const { fileName, code, mockFileName, mockCode, moduleName } = aiData.moduleData;
118
133
  console.log(\` \\x1b[90m⚙️ Architecting: \${moduleName}\\x1b[0m\`);
@@ -172,7 +187,7 @@ if (command === 'alex') {
172
187
  output: process.stdout,
173
188
  prompt: \`\\x1b[34m\${dynamicUsername} ❯ \\x1b[0m\`
174
189
  });
175
- process.stdout.write('\n\x1b[F');
190
+ process.stdout.write('\\n\\x1b[F');
176
191
  rl.prompt();
177
192
  rl.on('line', async (line) => {
178
193
  if (['exit', 'quit'].includes(line.trim().toLowerCase())) {
@@ -184,7 +199,7 @@ if (command === 'alex') {
184
199
  await processAlexRequest(line.trim());
185
200
  console.log('');
186
201
  }
187
- process.stdout.write('\n\x1b[F');
202
+ process.stdout.write('\\n\\x1b[F');
188
203
  rl.prompt();
189
204
  }).on('close', () => {
190
205
  process.exit(0);
@@ -408,7 +423,7 @@ async function setupProject() {
408
423
  fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
409
424
  console.log('\n \x1b[32m [Fleetbo] Project successfully created!\x1b[0m');
410
425
  console.log(`\n Run: cd ${projectName} && npm run fleetbo`);
411
- console.log('\ x1b[32m [Fleetbo] To start architecting with Alex, run: npm run fleetbo alex!\x1b[0m');
426
+ console.log('\ \x1b[32m [Fleetbo] To start architecting with Alex, run: npm run fleetbo alex!\x1b[0m');
412
427
  console.log('');
413
428
  } catch (error) {
414
429
  console.error('\n❌ Setup failed:', error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.51",
3
+ "version": "1.2.53",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {