fleetbo-cockpit-cli 1.0.240 → 1.0.242
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/cli.js +11 -5
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -217,8 +217,9 @@ if (command === 'alex') {
|
|
|
217
217
|
const initialPrompt = args.slice(1).join(' ');
|
|
218
218
|
|
|
219
219
|
const processAlexRequest = async (prompt) => {
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
// 🟢 LIMITE RÉDUITE À 2000 CARACTÈRES (~500 TOKENS)
|
|
221
|
+
if (prompt.length > 2000) {
|
|
222
|
+
console.log('\x1b[31m[Alex Safety] Request too long (' + prompt.length + '/2000 chars).\x1b[0m');
|
|
222
223
|
return;
|
|
223
224
|
}
|
|
224
225
|
|
|
@@ -442,9 +443,10 @@ if (command === 'alex') {
|
|
|
442
443
|
logStep('[2/3]', `\x1b[32mMock generated.\x1b[0m \x1b[90m(${aiData2.outputTokensUsed || 0} tokens)\x1b[0m\n`);
|
|
443
444
|
|
|
444
445
|
logStep('[3/3]', '\x1b[33mFinalizing JSON configuration...\x1b[0m');
|
|
446
|
+
|
|
447
|
+
// 🟢 MOCK DROP : ON N'ENVOIE QUE LE NATIF À L'ÉTAPE 3
|
|
445
448
|
const aiData3 = await fetchStep('json_only', {
|
|
446
|
-
nativeCode: mergedModuleData.code
|
|
447
|
-
mockCode: mergedModuleData.mockCode
|
|
449
|
+
nativeCode: mergedModuleData.code
|
|
448
450
|
});
|
|
449
451
|
|
|
450
452
|
if (aiData3.moduleData) {
|
|
@@ -465,7 +467,11 @@ if (command === 'alex') {
|
|
|
465
467
|
if (typeof rawMsg === 'object') {
|
|
466
468
|
rawMsg = rawMsg.message || rawMsg.text || "Module generated.";
|
|
467
469
|
}
|
|
468
|
-
|
|
470
|
+
|
|
471
|
+
if (aiData.status === 'message') {
|
|
472
|
+
rawMsg = "[Chat Mode] " + rawMsg;
|
|
473
|
+
}
|
|
474
|
+
|
|
469
475
|
process.stdout.write(`[ALEX_START]${rawMsg}[ALEX_END]`);
|
|
470
476
|
}
|
|
471
477
|
|