natureco-cli 1.1.2 → 1.1.3
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/bin/natureco.js +1 -1
- package/package.json +1 -1
- package/src/commands/dashboard.js +2 -2
- package/src/utils/api.js +9 -6
package/bin/natureco.js
CHANGED
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">v1.1.
|
|
214
|
+
<div class="version-badge" id="version-badge">v1.1.3</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: 'v1.1.
|
|
344
|
+
version: 'v1.1.3',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/utils/api.js
CHANGED
|
@@ -31,11 +31,8 @@ async function _sendMessage(apiKey, botId, message, conversationId = null, skill
|
|
|
31
31
|
// agent_id boş veya undefined ise config'den oku
|
|
32
32
|
const agentId = botId || config.defaultBotId;
|
|
33
33
|
|
|
34
|
-
//
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
// system_prompt'u basitçe karaktere göre kes
|
|
38
|
-
const shortPrompt = skillPrompts ? skillPrompts.slice(0, 600) : '';
|
|
34
|
+
// System prompt'u basit ve kısa tut (max 300 karakter)
|
|
35
|
+
const systemPrompt = "Sen bir terminal asistanısın. Kullanıcı dosya listeleme, komut çalıştırma gibi istekler yaptığında bash tool kullan.";
|
|
39
36
|
|
|
40
37
|
const body = {
|
|
41
38
|
agent_id: agentId,
|
|
@@ -43,7 +40,7 @@ async function _sendMessage(apiKey, botId, message, conversationId = null, skill
|
|
|
43
40
|
conversation_id: conversationId,
|
|
44
41
|
platform: 'cli',
|
|
45
42
|
user_id: 'cli-user',
|
|
46
|
-
system_prompt:
|
|
43
|
+
system_prompt: systemPrompt
|
|
47
44
|
};
|
|
48
45
|
|
|
49
46
|
// Custom AI provider varsa ekle
|
|
@@ -62,6 +59,9 @@ async function _sendMessage(apiKey, botId, message, conversationId = null, skill
|
|
|
62
59
|
// body.tools = toolDefinitions;
|
|
63
60
|
// }
|
|
64
61
|
|
|
62
|
+
// Debug: Request body'yi logla
|
|
63
|
+
console.log('\n[DEBUG] API Request Body:', JSON.stringify(body, null, 2));
|
|
64
|
+
|
|
65
65
|
const data = await request('/api/agent/chat', {
|
|
66
66
|
method: 'POST',
|
|
67
67
|
headers: {
|
|
@@ -71,6 +71,9 @@ async function _sendMessage(apiKey, botId, message, conversationId = null, skill
|
|
|
71
71
|
body: JSON.stringify(body),
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
+
// Debug: API response'u logla
|
|
75
|
+
console.log('[DEBUG] API Response:', JSON.stringify(data, null, 2), '\n');
|
|
76
|
+
|
|
74
77
|
return data;
|
|
75
78
|
}
|
|
76
79
|
|