natureco-cli 2.14.1 → 2.14.2
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 +1 -1
- package/src/commands/chat.js +29 -8
- package/src/commands/dashboard.js +2 -2
package/package.json
CHANGED
package/src/commands/chat.js
CHANGED
|
@@ -174,7 +174,14 @@ async function chat(botName, options = {}) {
|
|
|
174
174
|
const terminalWidth = process.stdout.columns || 80;
|
|
175
175
|
const separator = '─'.repeat(terminalWidth);
|
|
176
176
|
|
|
177
|
-
//
|
|
177
|
+
// Rabbit ASCII art
|
|
178
|
+
const rabbit = chalk.cyan(' (\\\_/)\n') +
|
|
179
|
+
chalk.cyan(' (•ᴥ•)\n') +
|
|
180
|
+
chalk.cyan(' />🌿');
|
|
181
|
+
|
|
182
|
+
// Full UI header with rabbit
|
|
183
|
+
console.log(rabbit);
|
|
184
|
+
console.log('');
|
|
178
185
|
console.log(chalk.gray(separator));
|
|
179
186
|
|
|
180
187
|
// Line 1: NatureCo · botName · model · timezone
|
|
@@ -196,7 +203,7 @@ async function chat(botName, options = {}) {
|
|
|
196
203
|
// Line 2: Session · Commands · Ctrl+C
|
|
197
204
|
const line2 = chalk.gray('Session') +
|
|
198
205
|
chalk.gray(' · ') +
|
|
199
|
-
chalk.gray('
|
|
206
|
+
chalk.gray('/clear /bot /skills /memory /help') +
|
|
200
207
|
chalk.gray(' · ') +
|
|
201
208
|
chalk.gray('Ctrl+C to exit');
|
|
202
209
|
console.log(line2);
|
|
@@ -204,11 +211,11 @@ async function chat(botName, options = {}) {
|
|
|
204
211
|
console.log(chalk.gray(separator));
|
|
205
212
|
|
|
206
213
|
// Line 3: Memory info · Skills · Crons
|
|
207
|
-
const userName = memory.name || '';
|
|
214
|
+
const userName = memory.name || 'User';
|
|
208
215
|
const factCount = (memory.facts || []).length;
|
|
209
216
|
const skillCount = getSkills().length;
|
|
210
217
|
|
|
211
|
-
// Get cron count
|
|
218
|
+
// Get active cron count
|
|
212
219
|
let cronCount = 0;
|
|
213
220
|
try {
|
|
214
221
|
const fs2 = require('fs');
|
|
@@ -219,7 +226,7 @@ async function chat(botName, options = {}) {
|
|
|
219
226
|
}
|
|
220
227
|
} catch {}
|
|
221
228
|
|
|
222
|
-
const memoryInfo =
|
|
229
|
+
const memoryInfo = `Memory: ${userName}`;
|
|
223
230
|
const line3 = chalk.gray(memoryInfo + (factCount > 0 ? ` · ${factCount} facts` : '')) +
|
|
224
231
|
chalk.gray(' ') +
|
|
225
232
|
chalk.gray(`Skills: ${skillCount}`) +
|
|
@@ -368,6 +375,14 @@ async function chat(botName, options = {}) {
|
|
|
368
375
|
switch (command.toLowerCase()) {
|
|
369
376
|
case 'clear':
|
|
370
377
|
console.clear();
|
|
378
|
+
|
|
379
|
+
// Rabbit
|
|
380
|
+
const rabbitClear = chalk.cyan(' (\\\_/)\n') +
|
|
381
|
+
chalk.cyan(' (•ᴥ•)\n') +
|
|
382
|
+
chalk.cyan(' />🌿');
|
|
383
|
+
console.log(rabbitClear);
|
|
384
|
+
console.log('');
|
|
385
|
+
|
|
371
386
|
const terminalWidth2 = process.stdout.columns || 80;
|
|
372
387
|
const separator2 = '─'.repeat(terminalWidth2);
|
|
373
388
|
|
|
@@ -554,7 +569,9 @@ ${lastCodeBlock}
|
|
|
554
569
|
addMessageToSession(bot.id, session.id, '/ultrareview', botReply);
|
|
555
570
|
} catch (err) {
|
|
556
571
|
stopLoadingAnimation(loadingInterval);
|
|
557
|
-
|
|
572
|
+
// Extract clean error message
|
|
573
|
+
const errorMsg = err.message.split('"message":"')[1]?.split('"')[0] || err.message;
|
|
574
|
+
console.log(chalk.red(`Error: ${errorMsg}\n`));
|
|
558
575
|
}
|
|
559
576
|
|
|
560
577
|
rl.prompt();
|
|
@@ -589,7 +606,9 @@ ${lastCodeBlock}
|
|
|
589
606
|
addMessageToSession(bot.id, session.id, userMessage, botReply);
|
|
590
607
|
} catch (err) {
|
|
591
608
|
stopLoadingAnimation(loadingInterval);
|
|
592
|
-
|
|
609
|
+
// Extract clean error message
|
|
610
|
+
const errorMsg = err.message.split('"message":"')[1]?.split('"')[0] || err.message;
|
|
611
|
+
console.log(chalk.red(`Error: ${errorMsg}\n`));
|
|
593
612
|
}
|
|
594
613
|
|
|
595
614
|
rl.prompt();
|
|
@@ -693,7 +712,9 @@ ${lastCodeBlock}
|
|
|
693
712
|
}
|
|
694
713
|
} catch (err) {
|
|
695
714
|
stopLoadingAnimation(loadingInterval);
|
|
696
|
-
|
|
715
|
+
// Extract clean error message
|
|
716
|
+
const errorMsg = err.message.split('"message":"')[1]?.split('"')[0] || err.message;
|
|
717
|
+
console.log(chalk.red(`Error: ${errorMsg}\n`));
|
|
697
718
|
}
|
|
698
719
|
|
|
699
720
|
currentMessage = '';
|
|
@@ -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">v2.14.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.14.2</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: 'v2.14.
|
|
344
|
+
version: 'v2.14.2',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|