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.
- package/install-react-template.js +30 -29
- package/package.json +1 -1
|
@@ -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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
58
|
-
currentLine = words[
|
|
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
|
-
|
|
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⛔
|
|
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.
|
|
142
|
-
const remaining = aiData.
|
|
143
|
-
const limit = aiData.
|
|
144
|
-
const tierLabel = aiData.tier === '
|
|
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 ? '
|
|
147
|
-
console.log(\`\\x1b[36m
|
|
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) {
|