natureco-cli 2.14.9 → 2.14.10
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 +12 -17
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.14.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.14.10</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.10',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/utils/api.js
CHANGED
|
@@ -688,13 +688,9 @@ function clearConversation(conversationId) {
|
|
|
688
688
|
/**
|
|
689
689
|
* Legacy function for compatibility
|
|
690
690
|
* Now supports custom system prompts for different platforms (terminal, WhatsApp, etc.)
|
|
691
|
+
* @param {string} chatSystemPrompt - System prompt from chat.js (skills + memory + agents)
|
|
691
692
|
*/
|
|
692
|
-
async function sendMessage(apiKey, botId, message, conversationId = null,
|
|
693
|
-
// If skillPrompts is actually a system prompt (string), use it directly
|
|
694
|
-
if (typeof skillPrompts === 'string' && skillPrompts.includes('assistant')) {
|
|
695
|
-
return sendMessageToProvider(apiKey, message, conversationId, skillPrompts);
|
|
696
|
-
}
|
|
697
|
-
|
|
693
|
+
async function sendMessage(apiKey, botId, message, conversationId = null, chatSystemPrompt = '') {
|
|
698
694
|
// Get user's home directory
|
|
699
695
|
const homeDir = os.homedir();
|
|
700
696
|
|
|
@@ -742,24 +738,23 @@ TOOL SELECTION GUIDE:
|
|
|
742
738
|
- web_search: Use when users ask about current information, news, weather, or anything requiring internet search
|
|
743
739
|
- http_request: Use for API calls, webhooks, fetching URLs, testing endpoints`;
|
|
744
740
|
|
|
745
|
-
// Prepend botName
|
|
741
|
+
// Prepend botName
|
|
746
742
|
if (mem.botName) {
|
|
747
|
-
baseSystemPrompt = `Adın ${mem.botName}. Sen ${mem.botName}'sun. Adın sorulduğunda her zaman "${mem.botName}" de
|
|
743
|
+
baseSystemPrompt = `Adın ${mem.botName}. Sen ${mem.botName}'sun. Adın sorulduğunda her zaman "${mem.botName}" de.\n\n` + baseSystemPrompt;
|
|
748
744
|
}
|
|
749
745
|
|
|
750
746
|
let systemPrompt = baseSystemPrompt;
|
|
751
|
-
|
|
752
|
-
//
|
|
753
|
-
|
|
754
|
-
|
|
747
|
+
|
|
748
|
+
// Append chat.js system prompt (memory + skills + agents)
|
|
749
|
+
if (chatSystemPrompt) {
|
|
750
|
+
systemPrompt += '\n\n' + chatSystemPrompt;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
// Add MCP server names if enabled and loaded
|
|
755
754
|
const mcpTools = getMcpTools();
|
|
756
755
|
if (config.mcpEnabled !== false && mcpTools.length > 0) {
|
|
757
756
|
const mcpServerNames = Object.keys(mcpClients);
|
|
758
|
-
|
|
759
|
-
// Only show server names, not tool lists (reduce tokens)
|
|
760
|
-
mcpPrompt = `\n\nMCP SERVERS: ${mcpServerNames.join(', ')}`;
|
|
761
|
-
|
|
762
|
-
systemPrompt += mcpPrompt;
|
|
757
|
+
systemPrompt += `\n\nMCP SERVERS: ${mcpServerNames.join(', ')}`;
|
|
763
758
|
}
|
|
764
759
|
|
|
765
760
|
return sendMessageToProvider(apiKey, message, conversationId, systemPrompt);
|