natureco-cli 2.13.23 → 2.13.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 +1 -1
- package/src/commands/dashboard.js +2 -2
- package/src/utils/memory.js +9 -5
package/package.json
CHANGED
|
@@ -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.13.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.13.24</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.13.
|
|
344
|
+
version: 'v2.13.24',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/utils/memory.js
CHANGED
|
@@ -214,9 +214,9 @@ function getMemoryPrompt(botId) {
|
|
|
214
214
|
|
|
215
215
|
const parts = [];
|
|
216
216
|
|
|
217
|
-
// Add bot name if set (MUST be before empty check)
|
|
217
|
+
// Add bot name if set (MUST be before empty check) - stronger emphasis
|
|
218
218
|
if (botName) {
|
|
219
|
-
parts.push(`Your name is ${botName}.`);
|
|
219
|
+
parts.push(`Your name is ${botName}. ALWAYS introduce yourself as ${botName} when asked.`);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
// Check if there's any content to add
|
|
@@ -243,10 +243,14 @@ function getMemoryPrompt(botId) {
|
|
|
243
243
|
|
|
244
244
|
if (facts.length > 0) {
|
|
245
245
|
// Limit to top 15 facts to reduce token usage
|
|
246
|
-
const sorted = facts.sort((a, b) => b.score - a.score);
|
|
247
|
-
const topFacts = sorted.slice(0, 15)
|
|
246
|
+
const sorted = facts.sort((a, b) => (b.score || 0) - (a.score || 0));
|
|
247
|
+
const topFacts = sorted.slice(0, 15)
|
|
248
|
+
.map(f => typeof f === 'string' ? f : f.value) // Extract value from object
|
|
249
|
+
.filter(Boolean); // Remove null/undefined
|
|
248
250
|
|
|
249
|
-
|
|
251
|
+
if (topFacts.length > 0) {
|
|
252
|
+
parts.push(`Bilgiler: ${topFacts.join(', ')}`);
|
|
253
|
+
};
|
|
250
254
|
|
|
251
255
|
if (facts.length > 15) {
|
|
252
256
|
parts.push(`(${facts.length - 15} daha fazla bilgi mevcut)`);
|