natureco-cli 2.23.22 → 2.23.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.23.22",
3
+ "version": "2.23.24",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "bin": {
6
6
  "natureco": "bin/natureco.js"
@@ -603,11 +603,6 @@ ${indexPrompt}`;
603
603
  }
604
604
  }
605
605
 
606
- if (userMessage === 'exit' || userMessage === 'quit') {
607
- showSummary();
608
- process.exit(0);
609
- }
610
-
611
606
  stats.messageCount++;
612
607
  console.log(chalk.white('You ') + userMessage);
613
608
  conversationMessages.push({ role: 'user', content: userMessage });
@@ -725,15 +720,26 @@ ${indexPrompt}`;
725
720
  }
726
721
 
727
722
  async function promptLoop() {
728
- rl.question('', async (msg) => {
723
+ while (true) {
724
+ const msg = await new Promise(resolve => {
725
+ rl.question(chalk.gray('> '), resolve);
726
+ });
727
+
729
728
  process.stdout.write('\x1b[1A\x1b[2K');
729
+
730
+ const trimmed = msg.trim();
731
+ if (!trimmed) continue;
732
+ if (['exit', 'quit', 'çıkış', 'q'].includes(trimmed.toLowerCase())) {
733
+ rl.close();
734
+ process.exit(0);
735
+ }
736
+
730
737
  try {
731
- await handleMessage(msg);
738
+ await handleMessage(trimmed);
732
739
  } catch (err) {
733
- console.log(chalk.red(`\n ❌ Beklenmeyen hata: ${err.message}\n`));
740
+ console.error(chalk.red('Error: ' + err.message));
734
741
  }
735
- promptLoop();
736
- });
742
+ }
737
743
  }
738
744
 
739
745
  createRl();