squidclaw 0.8.1 → 0.8.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/lib/engine.js +16 -1
  2. package/package.json +1 -1
package/lib/engine.js CHANGED
@@ -213,7 +213,22 @@ export class SquidclawEngine {
213
213
  }
214
214
  }
215
215
 
216
- const result = await agent.processMessage(contactId, message, metadata);
216
+ // Show typing indicator while processing
217
+ const chatId = metadata.chatId || contactId;
218
+ const botInfo = this.telegramManager?.bots?.values()?.next()?.value;
219
+ let typingInterval;
220
+ if (botInfo) {
221
+ const sendTyping = () => { try { botInfo.bot.api.sendChatAction(chatId, 'typing').catch(() => {}); } catch {} };
222
+ sendTyping();
223
+ typingInterval = setInterval(sendTyping, 4000);
224
+ }
225
+
226
+ let result;
227
+ try {
228
+ result = await agent.processMessage(contactId, message, metadata);
229
+ } finally {
230
+ if (typingInterval) clearInterval(typingInterval);
231
+ }
217
232
 
218
233
  if (result.reaction && metadata.messageId) {
219
234
  try { await this.telegramManager.sendReaction(agentId, contactId, metadata.messageId, result.reaction, metadata); } catch {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squidclaw",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "\ud83e\udd91 AI agent platform \u2014 human-like agents for WhatsApp, Telegram & more",
5
5
  "main": "lib/engine.js",
6
6
  "bin": {