[Bug]: TTS audio is only sent for the first assistant text part of a turn
What is broken? With TTS enabled, when a turn produces more than one assistant text message, only the first one is spoken. The actual answer stays silent.
Steps to reproduce
- Enable TTS with
/ttsand use a working provider. - Send a prompt that the model answers with a short lead-in followed by the real answer.
- Observe one audio reply for the lead-in and no audio for the answer.
Additional context
Cause in the 0.25.3 source: prepareTtsResponseForSession() starts with consumeResponseMode(sessionId) (src/app/services/tts-service.ts:281), which reads the per-prompt mode and deletes it (consumePromptResponseMode, src/bot/handlers/prompt.ts:67). The caller runs once per completed assistant message (src/bot/events/handlers/assistant-response-handler.ts:317), so the first completed message consumes text_and_tts and every later message of the same turn gets null and is skipped.
Expected: the mode should cover the whole turn, for example by clearing it when the turn ends, or by collecting the turn's text parts and speaking only the final one.
Evidence: the bot log shows a single [TTS] Sent audio reply for the first part (114 characters) and none for the main answer (3179 characters); the session database contains exactly those two assistant text parts.