natureco-cli 1.0.50 → 1.0.51

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/bin/natureco.js CHANGED
@@ -45,10 +45,11 @@ program
45
45
  .action(bots);
46
46
 
47
47
  program
48
- .command('chat [bot-name]')
48
+ .command('chat [bot-name...]')
49
49
  .description('Start interactive chat with a bot (uses default bot if not specified)')
50
50
  .option('--resume [session-id]', 'Resume a previous session')
51
- .action((botName, options) => {
51
+ .action((botNameParts, options) => {
52
+ const botName = Array.isArray(botNameParts) ? botNameParts.join(' ') : botNameParts;
52
53
  chat(botName, options);
53
54
  });
54
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "1.0.50",
3
+ "version": "1.0.51",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -35,7 +35,7 @@ async function chat(botName, options = {}) {
35
35
  process.exit(1);
36
36
  }
37
37
 
38
- // Bot adı verilmediyse config'den defaultBot'u kullan
38
+ // Bot adı verilmediyse config'den defaultBot'u kullan veya interaktif seçim sun
39
39
  let bot;
40
40
  if (!botName) {
41
41
  const { getConfig } = require('../utils/config');
@@ -49,12 +49,24 @@ async function chat(botName, options = {}) {
49
49
  }
50
50
 
51
51
  if (!bot) {
52
- console.log(chalk.red('\n❌ No default bot configured.\n'));
53
- console.log(chalk.gray('Available bots:'));
54
- botList.bots.forEach(b => console.log(chalk.cyan(` - ${b.name}`)));
52
+ // Interaktif bot seçimi
53
+ console.log(chalk.yellow('Varsayılan bot bulunamadı. Lütfen bir bot seçin:\n'));
54
+ botList.bots.forEach((b, i) => {
55
+ console.log(chalk.cyan(` ${i + 1}. ${b.name}`));
56
+ });
55
57
  console.log('');
56
- console.log(chalk.yellow('Usage: natureco chat <bot-name>\n'));
57
- process.exit(1);
58
+
59
+ process.stdin.resume();
60
+ const { selectedBot } = await inquirer.prompt([
61
+ {
62
+ type: 'list',
63
+ name: 'selectedBot',
64
+ message: 'Bot seçin:',
65
+ choices: botList.bots.map((b, i) => ({ name: b.name, value: b.id })),
66
+ },
67
+ ]);
68
+
69
+ bot = botList.bots.find(b => b.id === selectedBot);
58
70
  }
59
71
  } else {
60
72
  // Bot adı ile eşleşen botu bul
@@ -211,7 +211,7 @@ body::before{
211
211
  <div class="header-bot-name" id="header-bot-name">Nature Bot</div>
212
212
  <div class="header-bot-model" id="header-bot-model">NatureCo</div>
213
213
  </div>
214
- <div class="version-badge" id="version-badge">v1.0.50</div>
214
+ <div class="version-badge" id="version-badge">v1.0.51</div>
215
215
  </div>
216
216
  <div class="messages" id="messages"></div>
217
217
  <div class="input-area">
@@ -341,7 +341,7 @@ function dashboard(action) {
341
341
  apiKey: cfg.apiKey,
342
342
  defaultBot: cfg.defaultBot,
343
343
  defaultBotId: cfg.defaultBotId,
344
- version: 'v1.0.50',
344
+ version: 'v1.0.51',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,