natureco-cli 2.13.14 → 2.13.16
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 -0
- package/src/utils/skills.js +13 -8
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.16</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.16',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/utils/api.js
CHANGED
|
@@ -529,6 +529,16 @@ async function sendMessageAnthropic(providerConfig, messages, tools) {
|
|
|
529
529
|
* Send message with tool support (universal)
|
|
530
530
|
*/
|
|
531
531
|
async function sendMessageToProvider(apiKey, message, conversationId = null, systemPrompt = null) {
|
|
532
|
+
// DEBUG: Write system prompt to file for inspection
|
|
533
|
+
try {
|
|
534
|
+
const debugPath = path.join(os.homedir(), '.natureco', 'debug-system-prompt.txt');
|
|
535
|
+
fs.writeFileSync(debugPath, systemPrompt || 'EMPTY');
|
|
536
|
+
console.log('[DEBUG] System prompt written to ~/.natureco/debug-system-prompt.txt');
|
|
537
|
+
console.log('[DEBUG] System prompt length:', (systemPrompt || '').length, 'chars');
|
|
538
|
+
} catch (err) {
|
|
539
|
+
// Silently fail if can't write debug file
|
|
540
|
+
}
|
|
541
|
+
|
|
532
542
|
const providerConfig = getProviderConfig();
|
|
533
543
|
|
|
534
544
|
if (!providerConfig) {
|
package/src/utils/skills.js
CHANGED
|
@@ -295,19 +295,24 @@ function getPopularSkills() {
|
|
|
295
295
|
// Get skill prompt injection content
|
|
296
296
|
function getSkillPrompts() {
|
|
297
297
|
const skills = getSkills();
|
|
298
|
+
|
|
299
|
+
if (skills.length === 0) {
|
|
300
|
+
return '';
|
|
301
|
+
}
|
|
302
|
+
|
|
298
303
|
const prompts = [];
|
|
299
304
|
|
|
300
305
|
for (const skill of skills) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
// Remove frontmatter
|
|
305
|
-
const withoutFrontmatter = content.replace(/^---\n[\s\S]*?\n---\n/, '');
|
|
306
|
-
prompts.push(`\n## Skill: ${skill.name}\n${withoutFrontmatter}`);
|
|
307
|
-
}
|
|
306
|
+
// Only add skill name and short description (not full SKILL.md content)
|
|
307
|
+
const desc = skill.description ? skill.description.slice(0, 100) : '';
|
|
308
|
+
prompts.push(`- ${skill.name}: ${desc}`);
|
|
308
309
|
}
|
|
309
310
|
|
|
310
|
-
|
|
311
|
+
// Limit to first 10 skills
|
|
312
|
+
const skillsList = prompts.slice(0, 10).join('\n');
|
|
313
|
+
const moreCount = skills.length > 10 ? ` (${skills.length - 10} more)` : '';
|
|
314
|
+
|
|
315
|
+
return `\n\nInstalled skills (${skills.length})${moreCount}:\n${skillsList}\nUse /skills for details.`;
|
|
311
316
|
}
|
|
312
317
|
|
|
313
318
|
module.exports = {
|