@c4t4/heyamigo 0.9.12 → 0.9.13

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/dist/config.js CHANGED
@@ -90,6 +90,12 @@ const ConfigSchema = z.object({
90
90
  // Default 25MB matches WhatsApp's published per-message media limit
91
91
  // for most kinds. Set to null to disable the check.
92
92
  maxOutboundMediaBytes: z.number().int().positive().nullable().default(25 * 1024 * 1024),
93
+ // Send a quick acknowledgement when an incoming message has media.
94
+ // Bridge for the typing-indicator regression in Phase 4 — without
95
+ // this, users wait silently while the chat worker processes the
96
+ // image. Set false to disable.
97
+ ackOnMedia: z.boolean().default(true),
98
+ mediaAckText: z.string().default('looking…'),
93
99
  }),
94
100
  storage: z.object({
95
101
  messagesDir: z.string(),
@@ -8,6 +8,7 @@ import { config } from '../config.js';
8
8
  import { logger } from '../logger.js';
9
9
  import { buildMemoryPreamble } from '../memory/preamble.js';
10
10
  import { enqueueInbound } from '../queue/inbound.js';
11
+ import { enqueueOutbound } from '../queue/outbound.js';
11
12
  import { detectMediaType, downloadAndSave, getMediaSize, mediaPromptTag, } from '../store/media.js';
12
13
  import { append } from '../store/messages.js';
13
14
  import { getDailyTokens } from '../store/usage.js';
@@ -215,6 +216,19 @@ async function processMessages(messages, sock, ownerJid, isHistorySync = false)
215
216
  const actorPersonId = senderAddress
216
217
  ? personIdForAddress(senderAddress)
217
218
  : null;
219
+ // For media-bearing messages, send an immediate "looking…" ack
220
+ // via outbound so the user isn't left wondering whether the bot
221
+ // saw the image (typing indicator was dropped in Phase 4 —
222
+ // followup commit will reinstate via ChannelAdapter.sendTyping).
223
+ // The chat worker still processes the actual reply normally.
224
+ if (media && config.reply.ackOnMedia !== false) {
225
+ enqueueOutbound({
226
+ address: chatAddress,
227
+ kind: 'text',
228
+ text: config.reply.mediaAckText,
229
+ idempotencyKey: `media-ack-${msg.key.id}`,
230
+ });
231
+ }
218
232
  enqueueInbound({
219
233
  address: chatAddress,
220
234
  actorAddress: senderAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4t4/heyamigo",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "WhatsApp AI bot powered by Claude with long-term memory, browser control, and role-based access",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",