vantuz 3.0.1 โ 3.1.0
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 +197 -109
- package/core/ai-provider.js +252 -0
- package/core/channels.js +334 -0
- package/core/engine.js +373 -0
- package/package.json +6 -3
package/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* ๐ VANTUZ CLI
|
|
4
|
-
*
|
|
3
|
+
* ๐ VANTUZ CLI v3.1
|
|
4
|
+
* Enterprise e-ticaret yรถnetimi
|
|
5
5
|
*
|
|
6
6
|
* Kullanฤฑm:
|
|
7
7
|
* vantuz tui โ Sohbet modu
|
|
@@ -13,19 +13,23 @@ import fs from 'fs';
|
|
|
13
13
|
import path from 'path';
|
|
14
14
|
import os from 'os';
|
|
15
15
|
import readline from 'readline';
|
|
16
|
+
import { getEngine } from './core/engine.js';
|
|
17
|
+
import { log, getLogs, clearLogs } from './core/ai-provider.js';
|
|
18
|
+
|
|
19
|
+
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
20
|
+
// CONFIG
|
|
21
|
+
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
16
22
|
|
|
17
|
-
// Config dosyalarฤฑ kullanฤฑcฤฑnฤฑn home dizininde saklanฤฑr
|
|
18
23
|
const VANTUZ_HOME = path.join(os.homedir(), '.vantuz');
|
|
19
24
|
const CONFIG_PATH = path.join(VANTUZ_HOME, '.env');
|
|
20
25
|
const CONFIG_JSON = path.join(VANTUZ_HOME, 'config.json');
|
|
21
26
|
|
|
22
|
-
// Dizin yoksa oluลtur
|
|
23
27
|
if (!fs.existsSync(VANTUZ_HOME)) {
|
|
24
28
|
fs.mkdirSync(VANTUZ_HOME, { recursive: true });
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
28
|
-
//
|
|
32
|
+
// COLORS
|
|
29
33
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
30
34
|
|
|
31
35
|
const colors = {
|
|
@@ -38,25 +42,21 @@ const colors = {
|
|
|
38
42
|
blue: '\x1b[34m',
|
|
39
43
|
magenta: '\x1b[35m',
|
|
40
44
|
cyan: '\x1b[36m',
|
|
41
|
-
white: '\x1b[37m'
|
|
42
|
-
bgBlue: '\x1b[44m',
|
|
43
|
-
bgMagenta: '\x1b[45m'
|
|
45
|
+
white: '\x1b[37m'
|
|
44
46
|
};
|
|
45
47
|
|
|
46
48
|
const c = (color, text) => `${colors[color]}${text}${colors.reset}`;
|
|
47
49
|
|
|
48
50
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
49
|
-
//
|
|
51
|
+
// HELPERS
|
|
50
52
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
51
53
|
|
|
52
|
-
function clearScreen() {
|
|
53
|
-
console.clear();
|
|
54
|
-
}
|
|
54
|
+
function clearScreen() { console.clear(); }
|
|
55
55
|
|
|
56
56
|
function printHeader() {
|
|
57
57
|
console.log(c('cyan', `
|
|
58
58
|
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
59
|
-
โ ๐ ${c('bold', 'VANTUZ AI')} - E-
|
|
59
|
+
โ ๐ ${c('bold', 'VANTUZ AI v3.1')} - Enterprise E-Ticaret โ
|
|
60
60
|
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
61
61
|
`));
|
|
62
62
|
}
|
|
@@ -100,10 +100,6 @@ function hasAnyAIKey(env) {
|
|
|
100
100
|
env.DEEPSEEK_API_KEY || env.GROQ_API_KEY || env.GEMINI_API_KEY;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
104
|
-
// READLINE HELPER
|
|
105
|
-
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
106
|
-
|
|
107
103
|
function createRL() {
|
|
108
104
|
return readline.createInterface({
|
|
109
105
|
input: process.stdin,
|
|
@@ -130,7 +126,7 @@ async function askYesNo(rl, question, defaultYes = true) {
|
|
|
130
126
|
}
|
|
131
127
|
|
|
132
128
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
133
|
-
// CONFIG
|
|
129
|
+
// CONFIG COMMAND
|
|
134
130
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
135
131
|
|
|
136
132
|
async function runConfig() {
|
|
@@ -153,10 +149,10 @@ async function runConfig() {
|
|
|
153
149
|
console.log(' 5) Gemini');
|
|
154
150
|
console.log(' 6) Atla (skip)');
|
|
155
151
|
|
|
156
|
-
const aiChoice = await ask(rl, '\n Seรงim', '
|
|
152
|
+
const aiChoice = await ask(rl, '\n Seรงim', '5');
|
|
157
153
|
if (aiChoice !== '6' && aiChoice.toLowerCase() !== 'skip') {
|
|
158
154
|
const providers = ['openai', 'anthropic', 'deepseek', 'groq', 'gemini'];
|
|
159
|
-
config.aiProvider = providers[parseInt(aiChoice) - 1] || '
|
|
155
|
+
config.aiProvider = providers[parseInt(aiChoice) - 1] || 'gemini';
|
|
160
156
|
|
|
161
157
|
const keyMap = {
|
|
162
158
|
openai: 'OPENAI_API_KEY',
|
|
@@ -215,7 +211,7 @@ async function runConfig() {
|
|
|
215
211
|
}
|
|
216
212
|
|
|
217
213
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
218
|
-
// TUI (
|
|
214
|
+
// TUI (CHAT MODE)
|
|
219
215
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
220
216
|
|
|
221
217
|
async function runTUI() {
|
|
@@ -223,15 +219,30 @@ async function runTUI() {
|
|
|
223
219
|
printHeader();
|
|
224
220
|
|
|
225
221
|
const rl = createRL();
|
|
226
|
-
const config = loadConfig();
|
|
227
222
|
const env = loadEnv();
|
|
228
223
|
|
|
229
|
-
console.log(c('
|
|
230
|
-
|
|
224
|
+
console.log(c('yellow', ' ๐ Engine baลlatฤฑlฤฑyor...'));
|
|
225
|
+
|
|
226
|
+
let engine;
|
|
227
|
+
try {
|
|
228
|
+
engine = await getEngine();
|
|
229
|
+
const status = engine.getStatus();
|
|
230
|
+
console.log(c('green', ` โ Engine hazฤฑr - ${status.connectedCount} platform baฤlฤฑ`));
|
|
231
|
+
|
|
232
|
+
if (status.productCount > 0) {
|
|
233
|
+
console.log(c('dim', ` ๐ฆ ${status.productCount} รผrรผn yรผklendi`));
|
|
234
|
+
}
|
|
235
|
+
} catch (e) {
|
|
236
|
+
console.log(c('red', ` โ Engine hatasฤฑ: ${e.message}`));
|
|
237
|
+
console.log(c('dim', ' Temel modda devam ediliyor...\n'));
|
|
238
|
+
engine = null;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
console.log(c('green', '\n ๐ฌ Sohbet Modu'));
|
|
242
|
+
console.log(c('dim', ' Komutlar: /help, /stok, /siparis, /fiyat, /test, /logs, /cikis\n'));
|
|
231
243
|
|
|
232
244
|
// Check AI config
|
|
233
|
-
|
|
234
|
-
if (!hasAI) {
|
|
245
|
+
if (!hasAnyAIKey(env)) {
|
|
235
246
|
console.log(c('yellow', ' โ ๏ธ AI saฤlayฤฑcฤฑ yapฤฑlandฤฑrฤฑlmamฤฑล.'));
|
|
236
247
|
console.log(c('dim', ' โ vantuz config komutunu รงalฤฑลtฤฑrฤฑn\n'));
|
|
237
248
|
}
|
|
@@ -248,13 +259,28 @@ async function runTUI() {
|
|
|
248
259
|
|
|
249
260
|
// Commands
|
|
250
261
|
if (input.startsWith('/')) {
|
|
251
|
-
await handleCommand(input,
|
|
262
|
+
await handleCommand(input, engine, env);
|
|
252
263
|
prompt();
|
|
253
264
|
return;
|
|
254
265
|
}
|
|
255
266
|
|
|
256
|
-
// AI Chat
|
|
257
|
-
|
|
267
|
+
// AI Chat via Engine
|
|
268
|
+
try {
|
|
269
|
+
console.log(c('dim', '\n ๐ง Dรผลรผnรผyorum...'));
|
|
270
|
+
|
|
271
|
+
let response;
|
|
272
|
+
if (engine) {
|
|
273
|
+
response = await engine.chat(input);
|
|
274
|
+
} else {
|
|
275
|
+
const { chat } = await import('./core/ai-provider.js');
|
|
276
|
+
response = await chat(input, loadConfig(), env);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
console.log(c('magenta', '\n Vantuz: ') + response);
|
|
280
|
+
} catch (e) {
|
|
281
|
+
console.log(c('red', `\n โ Hata: ${e.message}`));
|
|
282
|
+
}
|
|
283
|
+
|
|
258
284
|
prompt();
|
|
259
285
|
});
|
|
260
286
|
};
|
|
@@ -262,7 +288,7 @@ async function runTUI() {
|
|
|
262
288
|
prompt();
|
|
263
289
|
}
|
|
264
290
|
|
|
265
|
-
async function handleCommand(input,
|
|
291
|
+
async function handleCommand(input, engine, env) {
|
|
266
292
|
const [cmd, ...args] = input.slice(1).split(' ');
|
|
267
293
|
|
|
268
294
|
switch (cmd.toLowerCase()) {
|
|
@@ -270,46 +296,140 @@ async function handleCommand(input, config, env) {
|
|
|
270
296
|
case 'yardim':
|
|
271
297
|
console.log(`
|
|
272
298
|
${c('cyan', 'Komutlar:')}
|
|
273
|
-
/stok [platform] โ Stok durumu
|
|
274
|
-
/
|
|
275
|
-
/
|
|
299
|
+
/stok [platform] โ Stok durumu (gerรงek veri)
|
|
300
|
+
/siparis [n] โ Son n sipariล
|
|
301
|
+
/fiyat <bkod> <tl> โ Fiyat gรผncelle
|
|
302
|
+
/test โ Platform baฤlantฤฑ testi
|
|
303
|
+
/logs [n] โ Son n log satฤฑrฤฑ
|
|
304
|
+
/logs clear โ Loglarฤฑ temizle
|
|
276
305
|
/platformlar โ Baฤlฤฑ platformlar
|
|
277
|
-
/config โ Ayarlarฤฑ aรง
|
|
278
306
|
/cikis โ รฤฑkฤฑล
|
|
279
307
|
`);
|
|
280
308
|
break;
|
|
281
309
|
|
|
282
310
|
case 'stok':
|
|
283
|
-
|
|
284
|
-
|
|
311
|
+
if (!engine) {
|
|
312
|
+
console.log(c('red', '\n โ Engine yรผklenmedi'));
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
console.log(c('yellow', '\n ๐ฆ Stok รงekiliyor...'));
|
|
316
|
+
try {
|
|
317
|
+
const platform = args[0] || 'all';
|
|
318
|
+
const results = await engine.getStock(platform);
|
|
319
|
+
|
|
320
|
+
if (results.length === 0) {
|
|
321
|
+
console.log(c('dim', ' Baฤlฤฑ platform yok veya stok bulunamadฤฑ.'));
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
for (const r of results) {
|
|
326
|
+
console.log(c('cyan', `\n ${r.icon} ${r.platform.toUpperCase()}`));
|
|
327
|
+
if (r.products.length === 0) {
|
|
328
|
+
console.log(c('dim', ' รrรผn bulunamadฤฑ'));
|
|
329
|
+
} else {
|
|
330
|
+
r.products.slice(0, 10).forEach(p => {
|
|
331
|
+
const stockColor = p.stock > 10 ? 'green' : p.stock > 0 ? 'yellow' : 'red';
|
|
332
|
+
console.log(` ${p.barcode}: ${c(stockColor, `${p.stock} adet`)} - ${p.price} TL`);
|
|
333
|
+
});
|
|
334
|
+
if (r.products.length > 10) {
|
|
335
|
+
console.log(c('dim', ` ... ve ${r.products.length - 10} รผrรผn daha`));
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
} catch (e) {
|
|
340
|
+
console.log(c('red', ` โ Hata: ${e.message}`));
|
|
341
|
+
log('ERROR', 'Stok รงekme hatasฤฑ', { error: e.message });
|
|
342
|
+
}
|
|
343
|
+
break;
|
|
344
|
+
|
|
345
|
+
case 'siparis':
|
|
346
|
+
case 'siparisler':
|
|
347
|
+
if (!engine) {
|
|
348
|
+
console.log(c('red', '\n โ Engine yรผklenmedi'));
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
console.log(c('yellow', '\n ๐ Sipariลler รงekiliyor...'));
|
|
352
|
+
try {
|
|
353
|
+
const orders = await engine.getOrders();
|
|
354
|
+
const limit = parseInt(args[0]) || 10;
|
|
355
|
+
|
|
356
|
+
if (orders.length === 0) {
|
|
357
|
+
console.log(c('dim', ' Sipariล bulunamadฤฑ.'));
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
console.log(c('cyan', `\n Son ${Math.min(limit, orders.length)} sipariล:`));
|
|
362
|
+
orders.slice(0, limit).forEach((o, i) => {
|
|
363
|
+
console.log(` ${i + 1}. ${o._icon} #${o.orderNumber || o.id} - ${o.totalPrice || 'N/A'} TL`);
|
|
364
|
+
});
|
|
365
|
+
} catch (e) {
|
|
366
|
+
console.log(c('red', ` โ Hata: ${e.message}`));
|
|
367
|
+
}
|
|
285
368
|
break;
|
|
286
369
|
|
|
287
370
|
case 'fiyat':
|
|
288
|
-
|
|
289
|
-
|
|
371
|
+
if (!engine) {
|
|
372
|
+
console.log(c('red', '\n โ Engine yรผklenmedi'));
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
const [barcode, priceStr] = args;
|
|
376
|
+
if (!barcode || !priceStr) {
|
|
377
|
+
console.log(c('yellow', ' Kullanฤฑm: /fiyat <barkod> <fiyat>'));
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
console.log(c('yellow', `\n ๐ฐ Fiyat gรผncelleniyor: ${barcode} โ ${priceStr} TL`));
|
|
381
|
+
try {
|
|
382
|
+
const results = await engine.updatePrice(barcode, parseFloat(priceStr));
|
|
383
|
+
for (const [platform, result] of Object.entries(results)) {
|
|
384
|
+
const status = result?.success ? c('green', 'โ') : c('red', 'โ');
|
|
385
|
+
console.log(` ${status} ${platform}`);
|
|
386
|
+
}
|
|
387
|
+
} catch (e) {
|
|
388
|
+
console.log(c('red', ` โ Hata: ${e.message}`));
|
|
389
|
+
}
|
|
290
390
|
break;
|
|
291
391
|
|
|
292
|
-
case '
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
392
|
+
case 'test':
|
|
393
|
+
if (!engine) {
|
|
394
|
+
console.log(c('red', '\n โ Engine yรผklenmedi'));
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
console.log(c('yellow', '\n ๐ Baฤlantฤฑlar test ediliyor...'));
|
|
398
|
+
try {
|
|
399
|
+
const results = await engine.testConnections();
|
|
400
|
+
for (const [platform, connected] of Object.entries(results)) {
|
|
401
|
+
const status = connected ? c('green', 'โ Baฤlฤฑ') : c('red', 'โ Baฤlanamadฤฑ');
|
|
402
|
+
console.log(` ${platform}: ${status}`);
|
|
403
|
+
}
|
|
404
|
+
} catch (e) {
|
|
405
|
+
console.log(c('red', ` โ Hata: ${e.message}`));
|
|
406
|
+
}
|
|
296
407
|
break;
|
|
297
408
|
|
|
298
|
-
case '
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
`);
|
|
409
|
+
case 'logs':
|
|
410
|
+
case 'log':
|
|
411
|
+
if (args[0] === 'clear') {
|
|
412
|
+
clearLogs();
|
|
413
|
+
console.log(c('green', '\n โ Loglar temizlendi'));
|
|
414
|
+
} else {
|
|
415
|
+
const lineCount = parseInt(args[0]) || 30;
|
|
416
|
+
console.log(c('cyan', `\n ๐ Son ${lineCount} log:`));
|
|
417
|
+
console.log(c('dim', getLogs(lineCount)));
|
|
418
|
+
}
|
|
309
419
|
break;
|
|
310
420
|
|
|
311
|
-
case '
|
|
312
|
-
|
|
421
|
+
case 'platformlar':
|
|
422
|
+
if (engine) {
|
|
423
|
+
const status = engine.getStatus();
|
|
424
|
+
console.log(c('cyan', '\n Platform Durumu:'));
|
|
425
|
+
for (const [name, info] of Object.entries(status.platforms)) {
|
|
426
|
+
const connStatus = info.connected ? c('green', 'โ Baฤlฤฑ') : c('dim', 'โ');
|
|
427
|
+
console.log(` ${info.icon} ${name}: ${connStatus}`);
|
|
428
|
+
}
|
|
429
|
+
console.log(c('dim', `\n Toplam: ${status.connectedCount}/${status.totalPlatforms} baฤlฤฑ`));
|
|
430
|
+
} else {
|
|
431
|
+
console.log(c('dim', ' Engine yรผklenmedi.'));
|
|
432
|
+
}
|
|
313
433
|
break;
|
|
314
434
|
|
|
315
435
|
case 'cikis':
|
|
@@ -324,72 +444,40 @@ async function handleCommand(input, config, env) {
|
|
|
324
444
|
}
|
|
325
445
|
}
|
|
326
446
|
|
|
327
|
-
async function processChat(input, config, env) {
|
|
328
|
-
// Simple NL parsing
|
|
329
|
-
const lower = input.toLowerCase();
|
|
330
|
-
|
|
331
|
-
if (lower.includes('stok') && (lower.includes('dรผลรผk') || lower.includes('az'))) {
|
|
332
|
-
return 'Dรผลรผk stoklu รผrรผnleri kontrol ediyorum... (API baฤlantฤฑsฤฑ gerekli)';
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
if (lower.includes('fiyat') && lower.includes('gรผncelle')) {
|
|
336
|
-
return 'Fiyat gรผncellemesi iรงin /fiyat <รผrรผn> <tl> komutunu kullanฤฑn.';
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
if (lower.includes('sipariล') || lower.includes('order')) {
|
|
340
|
-
return 'Sipariลleri kontrol ediyorum... (API baฤlantฤฑsฤฑ gerekli)';
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
if (lower.includes('rapor')) {
|
|
344
|
-
return 'Rapor iรงin /rapor 7d yazabilirsiniz.';
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
// Default response
|
|
348
|
-
if (!hasAnyAIKey(env)) {
|
|
349
|
-
return 'AI yanฤฑtฤฑ iรงin API anahtarฤฑ gerekli. "vantuz config" ile ayarlayฤฑn.';
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
return 'Anladฤฑm! Bu iลlem iรงin pazaryeri API baฤlantฤฑsฤฑ gerekiyor.';
|
|
353
|
-
}
|
|
354
|
-
|
|
355
447
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
356
|
-
// STATUS
|
|
448
|
+
// STATUS COMMAND
|
|
357
449
|
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
358
450
|
|
|
359
451
|
async function runStatus() {
|
|
360
452
|
printHeader();
|
|
361
453
|
|
|
362
|
-
|
|
363
|
-
const env = loadEnv();
|
|
454
|
+
console.log(c('yellow', ' ๐ Engine baลlatฤฑlฤฑyor...\n'));
|
|
364
455
|
|
|
365
|
-
|
|
456
|
+
try {
|
|
457
|
+
const engine = await getEngine();
|
|
458
|
+
const status = engine.getStatus();
|
|
366
459
|
|
|
367
|
-
|
|
368
|
-
const aiProvider = config.aiProvider || 'Ayarlanmamฤฑล';
|
|
369
|
-
const hasAIKey = hasAnyAIKey(env);
|
|
370
|
-
console.log(` AI Saฤlayฤฑcฤฑ: ${aiProvider} ${hasAIKey ? c('green', 'โ') : c('red', 'โ')}`);
|
|
460
|
+
console.log(c('cyan', ' ๐ Sistem Durumu\n'));
|
|
371
461
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
[
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
462
|
+
// AI
|
|
463
|
+
console.log(` AI Saฤlayฤฑcฤฑ: ${status.aiProvider || 'Ayarlanmamฤฑล'} ${hasAnyAIKey(loadEnv()) ? c('green', 'โ') : c('red', 'โ')}`);
|
|
464
|
+
console.log(` Engine: ${status.engine === 'active' ? c('green', 'โ Aktif') : c('red', 'โ Pasif')}`);
|
|
465
|
+
console.log(` รrรผn Sayฤฑsฤฑ: ${status.productCount}`);
|
|
466
|
+
|
|
467
|
+
// Platforms
|
|
468
|
+
console.log('\n Platformlar:');
|
|
469
|
+
for (const [name, info] of Object.entries(status.platforms)) {
|
|
470
|
+
const connStatus = info.connected ? c('green', 'โ Baฤlฤฑ') : c('dim', 'โ');
|
|
471
|
+
console.log(` ${info.icon} ${name}: ${connStatus}`);
|
|
472
|
+
}
|
|
383
473
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
console.log(
|
|
474
|
+
console.log(`\n Toplam: ${status.connectedCount}/${status.totalPlatforms} platform baฤlฤฑ`);
|
|
475
|
+
console.log(c('dim', `\n Config: ${CONFIG_PATH}`));
|
|
476
|
+
} catch (e) {
|
|
477
|
+
console.log(c('red', ` โ Engine hatasฤฑ: ${e.message}`));
|
|
478
|
+
console.log(c('dim', ' /logs komutu ile detay gรถrรผn'));
|
|
389
479
|
}
|
|
390
480
|
|
|
391
|
-
console.log(`\n Toplam: ${connected}/${platforms.length} platform baฤlฤฑ`);
|
|
392
|
-
console.log(c('dim', `\n Config: ${CONFIG_PATH}`));
|
|
393
481
|
console.log();
|
|
394
482
|
}
|
|
395
483
|
|