create-fleetbo-project 1.2.50 → 1.2.52
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 +19 -4
- package/package.json +1 -1
|
@@ -110,9 +110,24 @@ if (command === 'alex') {
|
|
|
110
110
|
const limit = aiData.limit || 2500;
|
|
111
111
|
const percent = Math.round((remaining / limit) * 100);
|
|
112
112
|
const energyColor = percent > 30 ? '\\x1b[32m' : '\\x1b[31m';
|
|
113
|
-
console.log(\`\\x1b[36m
|
|
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\`);
|
|
@@ -121,7 +136,7 @@ if (command === 'alex') {
|
|
|
121
136
|
const filePath = path.join(fullPath, name);
|
|
122
137
|
if (!fs.existsSync(fullPath)) fs.mkdirSync(fullPath, { recursive: true });
|
|
123
138
|
fs.writeFileSync(filePath, content);
|
|
124
|
-
console.log(\`
|
|
139
|
+
console.log(\` \\x1b[32m[Written]\\x1b[0m \${dir}\${name}\`);
|
|
125
140
|
};
|
|
126
141
|
if (code && fileName) {
|
|
127
142
|
const folder = fileName.endsWith('.kt') ? 'public/native/android/' : 'src/pages/';
|
|
@@ -135,7 +150,7 @@ if (command === 'alex') {
|
|
|
135
150
|
}
|
|
136
151
|
} catch (error) {
|
|
137
152
|
process.stdout.write('\\r' + ' '.repeat(50) + '\\r');
|
|
138
|
-
console.error('\\n\\x1b[31m
|
|
153
|
+
console.error('\\n\\x1b[31m Alex Error:\\x1b[0m ' + (error.response?.data?.message || error.message));
|
|
139
154
|
}
|
|
140
155
|
};
|
|
141
156
|
const startAlexSession = async () => {
|
|
@@ -212,7 +227,7 @@ if (command === 'deploy') {
|
|
|
212
227
|
console.log('\\n📦 \\x1b[33mPreparing Neural Logic for Uplink...\\x1b[0m');
|
|
213
228
|
await showEnergyTransfer();
|
|
214
229
|
await axios.post(CLOUD_ENGINE_URL, zipBuffer, { headers: { 'Content-Type': 'application/zip', 'x-project-id': projectId } });
|
|
215
|
-
console.log('\\n
|
|
230
|
+
console.log('\\n \\x1b[1mDEPLOYMENT SUCCESSFUL\\x1b[0m | \\x1b[32mAlex ❯\\x1b[0m Runtime updated.');
|
|
216
231
|
} catch (error) { process.exit(1); }
|
|
217
232
|
})();
|
|
218
233
|
return;
|