natureco-cli 2.13.24 → 2.13.25
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/api.js +10 -1
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.25</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.25',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/utils/api.js
CHANGED
|
@@ -687,8 +687,12 @@ async function sendMessage(apiKey, botId, message, conversationId = null, skillP
|
|
|
687
687
|
// Get user's home directory
|
|
688
688
|
const homeDir = os.homedir();
|
|
689
689
|
|
|
690
|
+
// Load memory to get botName
|
|
691
|
+
const { loadMemory } = require('./memory');
|
|
692
|
+
const mem = loadMemory(botId);
|
|
693
|
+
|
|
690
694
|
// Base system prompt for terminal assistant with dynamic home directory
|
|
691
|
-
|
|
695
|
+
let baseSystemPrompt = `You are a terminal assistant. When users ask for file listing, command execution, or directory viewing, you MUST use the available tools (bash, read_file, write_file, list_dir, web_search, http_request). Never say 'run this command' - execute it yourself using tools and show the result.
|
|
692
696
|
|
|
693
697
|
IMPORTANT: The user's home directory is: ${homeDir}
|
|
694
698
|
When listing home directory, always use list_dir with path: "${homeDir}"
|
|
@@ -717,6 +721,11 @@ TOOL SELECTION GUIDE:
|
|
|
717
721
|
- web_search: Use when users ask about current information, news, weather, or anything requiring internet search
|
|
718
722
|
- http_request: Use for API calls, webhooks, fetching URLs, testing endpoints`;
|
|
719
723
|
|
|
724
|
+
// Prepend botName to system prompt if available
|
|
725
|
+
if (mem.botName) {
|
|
726
|
+
baseSystemPrompt = `You are ${mem.botName}. Your name is ${mem.botName}. When asked your name, always say your name is "${mem.botName}". Never say you don't have a name.\n\n` + baseSystemPrompt;
|
|
727
|
+
}
|
|
728
|
+
|
|
720
729
|
let systemPrompt = baseSystemPrompt;
|
|
721
730
|
|
|
722
731
|
// Add MCP tool guidance if MCP servers are loaded
|