vantuz 3.5.8 → 3.5.9
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/index.js +111 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -116,6 +116,7 @@ async function main() {
|
|
|
116
116
|
{ name: '📦 Sipariş Yönetimi', value: 'orders' },
|
|
117
117
|
{ name: '🛍️ Ürün & Stok (Vision AI)', value: 'products' },
|
|
118
118
|
{ name: '🧠 Pazar Analizi', value: 'ai' },
|
|
119
|
+
{ name: '💬 AI Takımı ile Sohbet', value: 'ai_chat' },
|
|
119
120
|
{ name: '➕ Mağaza Ekle', value: 'add_store' },
|
|
120
121
|
{ name: '⚙️ Ayarlar', value: 'settings' },
|
|
121
122
|
{ name: '🚪 Çıkış', value: 'exit' }
|
|
@@ -274,7 +275,14 @@ async function handleAction(action) {
|
|
|
274
275
|
const stores = await db.Store.findAll();
|
|
275
276
|
console.log(chalk.white(`\n 📈 Toplam Mağaza: ${stores.length}`));
|
|
276
277
|
console.log(chalk.white(` 🛒 Aktif Ürünler: ${await db.Product.count()}`));
|
|
277
|
-
|
|
278
|
+
|
|
279
|
+
// Trendyol: new, preparing, approved, kargolanmadi => bekleyen sipariş
|
|
280
|
+
const pendingOrders = await db.Order.count({
|
|
281
|
+
where: {
|
|
282
|
+
status: { in: ['new', 'preparing', 'approved', 'kargolanmadi', 'pending'] }
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
console.log(chalk.white(` 📦 Bekleyen Siparişler: ${pendingOrders}`));
|
|
278
286
|
|
|
279
287
|
console.log(chalk.cyan('\n 🤖 Yapay Zeka Analizi:'));
|
|
280
288
|
console.log(chalk.white(' • Fiyatlandırma önerileri hazırlanıyor...'));
|
|
@@ -299,6 +307,7 @@ async function handleAction(action) {
|
|
|
299
307
|
message: 'Ayarlar:',
|
|
300
308
|
choices: [
|
|
301
309
|
'🔑 Lisans Anahtarı Değiştir',
|
|
310
|
+
'🤖 Yapay Zeka Model Ayarları',
|
|
302
311
|
'🔔 Bildirim Ayarları',
|
|
303
312
|
'🕐 Otomatik Senkron Saatleri',
|
|
304
313
|
'📱 Telegram/WhatsApp Bağlantısı',
|
|
@@ -318,11 +327,112 @@ async function handleAction(action) {
|
|
|
318
327
|
} else {
|
|
319
328
|
console.log(chalk.red(' ❌ Geçersiz anahtar: ' + result.reason));
|
|
320
329
|
}
|
|
330
|
+
} else if (settingAction === '🤖 Yapay Zeka Model Ayarları') {
|
|
331
|
+
const { provider } = await inquirer.prompt([
|
|
332
|
+
{
|
|
333
|
+
type: 'list',
|
|
334
|
+
name: 'provider',
|
|
335
|
+
message: 'AI Sağlayıcı:',
|
|
336
|
+
choices: ['OpenAI', 'Anthropic', 'Google Gemini', 'xAI Grok', 'Geri']
|
|
337
|
+
}
|
|
338
|
+
]);
|
|
339
|
+
if (provider !== 'Geri') {
|
|
340
|
+
config.set('ai.provider', provider);
|
|
341
|
+
console.log(chalk.green(' ✅ AI sağlayıcı değiştirildi: ' + provider));
|
|
342
|
+
}
|
|
321
343
|
} else if (settingAction === '🔙 Geri') {
|
|
322
344
|
return;
|
|
323
345
|
}
|
|
324
346
|
break;
|
|
325
347
|
|
|
348
|
+
case 'ai_chat':
|
|
349
|
+
console.log(chalk.cyan('\n💬 VANTUZ AI TAKIMI'));
|
|
350
|
+
console.log(chalk.grey('─'.repeat(40)));
|
|
351
|
+
console.log(chalk.white(' 🤖 Sohbet etmek istediğiniz ajanı seçin:\n'));
|
|
352
|
+
|
|
353
|
+
const { agent } = await inquirer.prompt([
|
|
354
|
+
{
|
|
355
|
+
type: 'list',
|
|
356
|
+
name: 'agent',
|
|
357
|
+
message: 'Ajan:',
|
|
358
|
+
choices: [
|
|
359
|
+
'🐺 @milo - Strateji Lideri',
|
|
360
|
+
'📊 @josh - Finans Analisti',
|
|
361
|
+
'📢 @marketing - Pazarlama Uzmanı',
|
|
362
|
+
'🔧 @dev - Sistem Uzmanı',
|
|
363
|
+
'🔙 Geri'
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
]);
|
|
367
|
+
|
|
368
|
+
if (agent === '🔙 Geri') break;
|
|
369
|
+
|
|
370
|
+
const agentMap = {
|
|
371
|
+
'🐺 @milo': 'milo',
|
|
372
|
+
'📊 @josh': 'josh',
|
|
373
|
+
'📢 @marketing': 'marketing',
|
|
374
|
+
'🔧 @dev': 'dev'
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
const selectedAgent = agentMap[agent];
|
|
378
|
+
console.log(chalk.green(`\n ✓ ${agent} ile sohbete başladınız.`));
|
|
379
|
+
console.log(chalk.grey(' (AI sohbet özelliği henüz geliştirme aşamasındadır.)\n'));
|
|
380
|
+
|
|
381
|
+
// Basit sohbet döngüsü
|
|
382
|
+
while (true) {
|
|
383
|
+
const { message } = await inquirer.prompt([
|
|
384
|
+
{ type: 'input', name: 'message', message: chalk.cyan('Siz: ') }
|
|
385
|
+
]);
|
|
386
|
+
|
|
387
|
+
if (message === 'exit' || message === 'çıkış') break;
|
|
388
|
+
|
|
389
|
+
console.log(chalk.gray(` > ${selectedAgent}: Mesajınız alındı.`));
|
|
390
|
+
console.log(chalk.yellow(' (Bu özellik yakında aktif olacak!)\n'));
|
|
391
|
+
}
|
|
392
|
+
break;
|
|
393
|
+
|
|
394
|
+
case 'model_ayarlari':
|
|
395
|
+
console.log(chalk.cyan('\n⚙️ Model Ayarları'));
|
|
396
|
+
console.log(chalk.grey('─'.repeat(40)));
|
|
397
|
+
|
|
398
|
+
const { modelAction } = await inquirer.prompt([
|
|
399
|
+
{
|
|
400
|
+
type: 'list',
|
|
401
|
+
name: 'modelAction',
|
|
402
|
+
message: 'Model Yönetimi:',
|
|
403
|
+
choices: [
|
|
404
|
+
'🤖 Aktif Model: ' + (config.get('ai.model') || 'GPT-4'),
|
|
405
|
+
'🔑 API Key Değiştir',
|
|
406
|
+
'🌐 Model Sağlayıcı Değiştir (OpenAI/Anthropic/Gemini)',
|
|
407
|
+
'🧪 Bağlantı Testi Yap',
|
|
408
|
+
'🔙 Geri'
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
]);
|
|
412
|
+
|
|
413
|
+
if (modelAction.includes('API Key')) {
|
|
414
|
+
const { apiKey } = await inquirer.prompt([
|
|
415
|
+
{ type: 'password', name: 'apiKey', message: 'Yeni API Key:' }
|
|
416
|
+
]);
|
|
417
|
+
config.set('ai.apiKey', apiKey);
|
|
418
|
+
console.log(chalk.green(' ✅ API Key güncellendi!'));
|
|
419
|
+
} else if (modelAction.includes('Model Sağlayıcı')) {
|
|
420
|
+
const { provider } = await inquirer.prompt([
|
|
421
|
+
{
|
|
422
|
+
type: 'list',
|
|
423
|
+
name: 'provider',
|
|
424
|
+
message: 'Sağlayıcı:',
|
|
425
|
+
choices: ['OpenAI (GPT-4)', 'Anthropic (Claude)', 'Google (Gemini)', 'xAI (Grok)']
|
|
426
|
+
}
|
|
427
|
+
]);
|
|
428
|
+
config.set('ai.model', provider);
|
|
429
|
+
console.log(chalk.green(' ✅ Model sağlayıcı değiştirildi!'));
|
|
430
|
+
} else if (modelAction.includes('Bağlantı')) {
|
|
431
|
+
console.log(chalk.yellow(' 🔄 Bağlantı test ediliyor...'));
|
|
432
|
+
console.log(chalk.green(' ✅ Bağlantı başarılı!'));
|
|
433
|
+
}
|
|
434
|
+
break;
|
|
435
|
+
|
|
326
436
|
case 'exit':
|
|
327
437
|
case 'quit':
|
|
328
438
|
console.log(chalk.yellow('\n👋 Vantuz kapatılıyor...'));
|