From e5e73e37798b2e99b520ef1ff4f58fbd66c2f9d0 Mon Sep 17 00:00:00 2001 From: zidongdesign Date: Wed, 18 Mar 2026 10:10:42 +0800 Subject: [PATCH] fix(tts): skip TTS synthesis for compaction notices Compaction start/completion notices carry isCompactionNotice: true on the ReplyPayload. Guard maybeApplyTtsToPayload() with an early return so these informational UI signals are never synthesised as speech, regardless of TTS mode or auto-mode configuration. Addresses review feedback from jalehman on PR #38805. --- src/tts/tts.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tts/tts.ts b/src/tts/tts.ts index 17a7c2fc981..348ff94be91 100644 --- a/src/tts/tts.ts +++ b/src/tts/tts.ts @@ -825,6 +825,10 @@ export async function maybeApplyTtsToPayload(params: { inboundAudio?: boolean; ttsAuto?: string; }): Promise { + // Compaction notices are informational UI signals — never synthesise them as speech. + if (params.payload.isCompactionNotice) { + return params.payload; + } const config = resolveTtsConfig(params.cfg); const prefsPath = resolveTtsPrefsPath(config); const autoMode = resolveTtsAutoMode({