@inetafrica/open-claudia 1.3.1 → 1.3.2

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.
Files changed (2) hide show
  1. package/bot.js +21 -6
  2. package/package.json +1 -1
package/bot.js CHANGED
@@ -455,6 +455,10 @@ The bot code. Read to understand capabilities. Only modify if explicitly asked.
455
455
  ### ${path.join(BOT_DIR, ".env")}
456
456
  Configuration (Telegram token, paths, etc). Sensitive — don't expose values.
457
457
 
458
+ ## Received Files
459
+ Files sent by the user are saved in: ${FILES_DIR}
460
+ ${fs.existsSync(FILES_DIR) ? (() => { try { const f = fs.readdirSync(FILES_DIR); return f.length > 0 ? "Current files: " + f.slice(-10).join(", ") : "No files yet."; } catch(e) { return ""; } })() : ""}
461
+
458
462
  ## Telegram API
459
463
  Send things directly to the user:
460
464
 
@@ -462,13 +466,20 @@ Text: curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" -d chat
462
466
  File: curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendDocument" -F chat_id=${CHAT_ID} -F document=@/path/to/file
463
467
  Image: curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendPhoto" -F chat_id=${CHAT_ID} -F photo=@/path/to/image.png
464
468
 
469
+ ## Session
470
+ ${lastSessionId ? "Resuming conversation — you have prior context." : "New conversation."}
471
+
465
472
  ## Guidelines
466
- - Keep responses concise — mobile screen.
467
- - Send long output as Telegram documents, not text.
468
- - Act on screenshots (fix bugs, implement designs) — don't just describe.
473
+ - Keep responses concise — this is a mobile screen.
474
+ - Use Telegram-compatible markdown: *bold*, _italic_, \`code\`, \`\`\`code blocks\`\`\`. No headers (#), no links [text](url).
475
+ - For long output (logs, diffs, large code), save to a file and send via the Telegram API curl above — don't paste walls of text.
476
+ - Act on screenshots (fix bugs, implement designs) — don't just describe what you see.
477
+ - When the user sends a file, it's saved in ${FILES_DIR}. Read it with the Read tool.
469
478
  - When asked to remember credentials, tell the user to use /vault.
470
479
  - When asked to change your personality, edit ${SOUL_FILE}.
471
- - You are self-aware of your architecture and can explain how you work.
480
+ - When asked about yourself, you are Open Claudia an AI coding assistant running Claude Code via Telegram.
481
+ - If a task will take a while, let the user know upfront.
482
+ - Don't ask for confirmation on simple tasks — just do them.
472
483
  `.trim();
473
484
  }
474
485
 
@@ -654,8 +665,12 @@ async function runClaude(prompt, cwd, replyToMsgId, opts = {}) {
654
665
  clearInterval(streamInterval); streamInterval = null;
655
666
  const finalText = assistantText || "(no output)";
656
667
  const chunks = splitMessage(finalText);
657
- if (statusMessageId) await editMessage(statusMessageId, chunks[0]);
658
- else await send(chunks[0], { replyTo: replyToMsgId });
668
+ // Edit the streaming message with the first chunk, send rest as new messages
669
+ if (statusMessageId) {
670
+ await editMessage(statusMessageId, chunks[0]);
671
+ } else {
672
+ await send(chunks[0], { replyTo: replyToMsgId });
673
+ }
659
674
  for (let i = 1; i < chunks.length; i++) {
660
675
  await send(chunks[i]);
661
676
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inetafrica/open-claudia",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Your always-on AI coding assistant — Claude Code via Telegram",
5
5
  "main": "bot.js",
6
6
  "bin": {