create-fleetbo-project 1.2.64 → 1.2.66

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.
@@ -38,30 +38,31 @@ const keyApp = process.env.REACT_KEY_APP;
38
38
  const testerEmail = process.env.REACT_APP_TESTER_EMAIL;
39
39
  const wrapText = (text, maxWidth) => {
40
40
  if (!text) return "";
41
-
42
- // 1. Nettoyage : On remplace les sauts de ligne de l'IA par des espaces pour recréer le flux
43
- // Cela évite les cassures "en escalier" dans le terminal
44
- const cleanText = text.replace(/(\r\n|\n|\r)/gm, " ");
45
-
46
- // 2. Découpage propre par mot (gère les espaces multiples)
47
- const words = cleanText.split(/\s+/).filter(w => w.length > 0);
48
-
49
- let lines = [];
50
- let currentLine = words[0] || "";
51
-
52
- for (let i = 1; i < words.length; i++) {
53
- // On vérifie si on dépasse la largeur (85)
54
- if (currentLine.length + 1 + words[i].length <= maxWidth) {
55
- currentLine += " " + words[i];
41
+ const rawLines = text.split('\\n');
42
+ let formattedLines = [];
43
+ rawLines.forEach(line => {
44
+ if (line.trim().length === 0) {
45
+ formattedLines.push("");
46
+ return;
47
+ }
48
+ const isSpecialFormat = /^[\\s]*[-*•\\d]/.test(line) || line.startsWith(" ");
49
+ if (isSpecialFormat) {
50
+ formattedLines.push(line);
56
51
  } else {
57
- lines.push(currentLine);
58
- currentLine = words[i];
52
+ const words = line.split(" ");
53
+ let currentLine = words[0];
54
+ for (let i = 1; i < words.length; i++) {
55
+ if (currentLine.length + 1 + words[i].length <= maxWidth) {
56
+ currentLine += " " + words[i];
57
+ } else {
58
+ formattedLines.push(currentLine);
59
+ currentLine = words[i];
60
+ }
61
+ }
62
+ formattedLines.push(currentLine);
59
63
  }
60
- }
61
- lines.push(currentLine);
62
-
63
- // 3. Re-assemblage avec indentation alignée (3 espaces)
64
- return lines.join('\n ');
64
+ });
65
+ return formattedLines.join('\\n ');
65
66
  };
66
67
  const checkGitSecurity = () => {
67
68
  const gitDir = path.join(process.cwd(), '.git');
@@ -131,20 +132,20 @@ if (command === 'alex') {
131
132
  const aiData = result.data;
132
133
  process.stdout.write('\\r' + ' '.repeat(50) + '\\r');
133
134
  if (aiData.status === 'quota_exceeded') {
134
- console.log(\`\\n\\x1b[31m⛔ ENGINE OUT OF FUEL:\\x1b[0m \${aiData.message}\`);
135
+ console.log(\`\\n\\x1b[31m⛔ ARCHITECT QUOTA REACHED:\\x1b[0m \${aiData.message}\`);
135
136
  return;
136
137
  }
137
138
  if (aiData.status === 'success' || aiData.status === 'message' || aiData.status === 'complex_refusal') {
138
139
  console.log('');
139
140
  const rawMsg = aiData.message || "I'm ready.";
140
141
  const formattedMsg = wrapText(rawMsg, 85);
141
- if (aiData.remainingTokens !== undefined) {
142
- const remaining = aiData.remainingTokens;
143
- const limit = aiData.limit || 2500;
144
- const tierLabel = aiData.tier === 'senior' ? 'SENIOR' : 'STARTER';
142
+ if (aiData.remainingConsultations !== undefined) {
143
+ const remaining = aiData.remainingConsultations;
144
+ const limit = aiData.consultationLimit || 50;
145
+ const tierLabel = aiData.tier === 'pro' ? 'SENIOR' : 'DISCOVERY';
145
146
  const percent = Math.round((remaining / limit) * 100);
146
- const energyColor = percent > 20 ? '\\x1b[32m' : '\\x1b[31m';
147
- console.log(\`\\x1b[36m Energy:\\x1b[0m \${energyColor}\${percent}%\\x1b[0m (\${remaining}/\${limit} tokens left)\`);
147
+ const energyColor = percent > 20 ? '\x1b[32m' : '\x1b[31m';
148
+ console.log(\`\\x1b[36m Architect Fuel:\\x1b[0m \${energyColor}\${percent}%\x1b[0m (\${remaining}/\${limit} consultations left) [\${tierLabel}]\`);
148
149
  }
149
150
  }
150
151
  if (aiData.status === 'success' && aiData.moduleData) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.64",
3
+ "version": "1.2.66",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {