diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2d2a253..3738b2c03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - CI: consolidate checks to avoid redundant installs (#144) — thanks @thewilloftheshadow. - WhatsApp: support `gifPlayback` for MP4 GIF sends via CLI/gateway. - Auto-reply: drop final payloads when block streaming to avoid duplicate Discord sends. +- Auto-reply: fix typing TTL to 2 minutes and log TTL with s/m units. - Bash tool: default auto-background delay to 10s. - Telegram: chunk block-stream replies to avoid “message is too long” errors (#124) — thanks @mukhtharcm. - Block streaming: default to text_end and suppress duplicate block sends while in-flight. diff --git a/src/auto-reply/reply.ts b/src/auto-reply/reply.ts index aee3f6ece..ea5cd54c0 100644 --- a/src/auto-reply/reply.ts +++ b/src/auto-reply/reply.ts @@ -833,7 +833,11 @@ export async function getReplyFromConfig( const typingIntervalSeconds = typeof configuredTypingSeconds === "number" ? configuredTypingSeconds : 6; const typingIntervalMs = typingIntervalSeconds * 1000; - const typingTtlMs = Math.min(Math.max(15_000, typingIntervalMs * 5), 60_000); + const typingTtlMs = 2 * 60_000; + const formatTypingTtl = (ms: number) => { + if (ms % 60_000 === 0) return `${ms / 60_000}m`; + return `${Math.round(ms / 1000)}s`; + }; const cleanupTyping = () => { if (typingTtlTimer) { clearTimeout(typingTtlTimer); @@ -854,7 +858,7 @@ export async function getReplyFromConfig( typingTtlTimer = setTimeout(() => { if (!typingTimer) return; defaultRuntime.log( - `typing TTL reached (${typingTtlMs}ms); stopping typing indicator`, + `typing TTL reached (${formatTypingTtl(typingTtlMs)}); stopping typing indicator`, ); cleanupTyping(); }, typingTtlMs);