natureco-cli 1.1.2 → 1.1.4

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 CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  const { Command } = require('commander');
4
4
  const chalk = require('chalk');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -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.2</div>
214
+ <div class="version-badge" id="version-badge">v1.1.4</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.2',
344
+ version: 'v1.1.4',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
package/src/utils/api.js CHANGED
@@ -31,21 +31,22 @@ 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
- // Terminal asistan prompt'u ekle
35
- const terminalPrompt = 'Sen bir terminal asistanısın. Kullanıcı dosya listeleme, komut çalıştırma, dizin görüntüleme gibi istekler yaptığında MUTLAKA bash veya filesystem tool\'larını kullan. Asla \'şu komutu çalıştırın\' deme — kendin çalıştır ve sonucu göster.\n\n';
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,
42
39
  message,
43
- conversation_id: conversationId,
44
40
  platform: 'cli',
45
41
  user_id: 'cli-user',
46
- system_prompt: terminalPrompt + shortPrompt
42
+ system_prompt: systemPrompt
47
43
  };
48
44
 
45
+ // conversation_id varsa ekle (null gönderme)
46
+ if (conversationId) {
47
+ body.conversation_id = conversationId;
48
+ }
49
+
49
50
  // Custom AI provider varsa ekle
50
51
  if (config.aiProvider && config.aiApiKey) {
51
52
  body.custom_provider = config.aiProvider;
@@ -62,6 +63,9 @@ async function _sendMessage(apiKey, botId, message, conversationId = null, skill
62
63
  // body.tools = toolDefinitions;
63
64
  // }
64
65
 
66
+ // Debug: Request body'yi logla
67
+ console.log('\n[DEBUG] API Request Body:', JSON.stringify(body, null, 2));
68
+
65
69
  const data = await request('/api/agent/chat', {
66
70
  method: 'POST',
67
71
  headers: {
@@ -71,6 +75,9 @@ async function _sendMessage(apiKey, botId, message, conversationId = null, skill
71
75
  body: JSON.stringify(body),
72
76
  });
73
77
 
78
+ // Debug: API response'u logla
79
+ console.log('[DEBUG] API Response:', JSON.stringify(data, null, 2), '\n');
80
+
74
81
  return data;
75
82
  }
76
83