natureco-cli 2.15.2 → 2.15.5
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
package/src/commands/chat.js
CHANGED
|
@@ -75,7 +75,7 @@ async function chat(botName, options = {}) {
|
|
|
75
75
|
}
|
|
76
76
|
} else {
|
|
77
77
|
// Bot adı ile eşleşen botu bul
|
|
78
|
-
bot = botList.bots.find(b => b.name.toLowerCase() === botName.toLowerCase());
|
|
78
|
+
bot = botList.bots.find(b => b.name && botName && b.name.toLowerCase() === botName.toLowerCase());
|
|
79
79
|
|
|
80
80
|
if (!bot) {
|
|
81
81
|
console.log(chalk.red(`\n❌ Bot "${botName}" not found.\n`));
|
|
@@ -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.15.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.15.5</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.15.
|
|
344
|
+
version: 'v2.15.5',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/commands/setup.js
CHANGED
|
@@ -290,6 +290,9 @@ async function setup() {
|
|
|
290
290
|
|
|
291
291
|
printDone(L, botName.trim());
|
|
292
292
|
|
|
293
|
+
// botName'in string olduğunu garantile
|
|
294
|
+
const safeBotName = String(botName || 'NatureBot').trim();
|
|
295
|
+
|
|
293
296
|
// ── ADIM 3: Kullanıcı adı ──────────────────────────────────────────────────
|
|
294
297
|
printStep(L, 3, L.userNameTitle);
|
|
295
298
|
|
|
@@ -411,7 +414,7 @@ async function setup() {
|
|
|
411
414
|
providerApiKey: providerApiKey.trim(),
|
|
412
415
|
providerModel,
|
|
413
416
|
apiKey: providerApiKey.trim(), // login bypass — chat doğrudan çalışsın
|
|
414
|
-
botName:
|
|
417
|
+
botName: safeBotName,
|
|
415
418
|
userName: userName.trim(),
|
|
416
419
|
debug: existingConfig.debug || false,
|
|
417
420
|
skills: existingConfig.skills || { enabled: true, list: [] },
|
|
@@ -429,7 +432,7 @@ async function setup() {
|
|
|
429
432
|
try {
|
|
430
433
|
saveMemory(botId, {
|
|
431
434
|
name: userName.trim(),
|
|
432
|
-
botName:
|
|
435
|
+
botName: safeBotName,
|
|
433
436
|
nickname: '',
|
|
434
437
|
preferences: [],
|
|
435
438
|
facts: [],
|
|
@@ -444,7 +447,7 @@ async function setup() {
|
|
|
444
447
|
console.log('');
|
|
445
448
|
console.log(chalk.gray(` ${L.summaryProvider}:`), chalk.white(providerUrl.replace('https://', '').split('/')[0]));
|
|
446
449
|
console.log(chalk.gray(` ${L.summaryModel}:`), chalk.white(providerModel));
|
|
447
|
-
console.log(chalk.gray(` ${L.summaryBot}:`), chalk.cyan(
|
|
450
|
+
console.log(chalk.gray(` ${L.summaryBot}:`), chalk.cyan(safeBotName));
|
|
448
451
|
console.log(chalk.gray(` ${L.summaryUser}:`), chalk.white(userName.trim()));
|
|
449
452
|
console.log(chalk.gray(` ${L.summaryConfig}:`), chalk.gray(CONFIG_FILE));
|
|
450
453
|
console.log('');
|
|
@@ -489,7 +492,7 @@ async function setup() {
|
|
|
489
492
|
console.log(chalk.cyan(` ${L.chatStart}`));
|
|
490
493
|
console.log('');
|
|
491
494
|
const chat = require('./chat');
|
|
492
|
-
await chat([], {});
|
|
495
|
+
await chat([safeBotName], {});
|
|
493
496
|
} else {
|
|
494
497
|
console.log(chalk.gray(` ${L.chatSkip}`));
|
|
495
498
|
console.log('');
|