natureco-cli 1.0.59 → 1.0.60

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
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.0.59</div>
214
+ <div class="version-badge" id="version-badge">v1.0.60</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.0.59',
344
+ version: 'v1.0.60',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
package/src/utils/api.js CHANGED
@@ -31,15 +31,20 @@ 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
- // system_prompt'u kısalt - isim + description (ilk 150 karakter)
35
- const shortPrompt = skillPrompts
36
- ? skillPrompts.split('## Skill:').filter(Boolean).map(s => {
37
- const lines = s.trim().split('\n');
38
- const name = lines[0].trim();
39
- const desc = lines.slice(1).join(' ').trim().slice(0, 150);
40
- return `## ${name}\n${desc}`;
41
- }).join('\n\n')
42
- : '';
34
+ // system_prompt'u kısalt - toplam 800 karakter limiti
35
+ const MAX_PROMPT_LENGTH = 800;
36
+ let shortPrompt = '';
37
+ if (skillPrompts) {
38
+ const skills = skillPrompts.split('## Skill:').filter(Boolean);
39
+ for (const s of skills) {
40
+ const lines = s.trim().split('\n');
41
+ const name = lines[0].trim();
42
+ const desc = lines.slice(1).join(' ').trim().slice(0, 100);
43
+ const entry = `## ${name}\n${desc}\n\n`;
44
+ if ((shortPrompt + entry).length > MAX_PROMPT_LENGTH) break;
45
+ shortPrompt += entry;
46
+ }
47
+ }
43
48
 
44
49
  const body = {
45
50
  agent_id: agentId,