From 87b54ce8f48f9d41415a029c0bb2361ada94b865 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Fri, 7 Aug 2026 20:14:38 -0400 Subject: [PATCH] Aggregate turn text into a complete LLMTextFrame to prevent TTS sentence truncation --- opencode_llm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencode_llm.py b/opencode_llm.py index 872f680..7c37458 100644 --- a/opencode_llm.py +++ b/opencode_llm.py @@ -322,11 +322,14 @@ class OpenCodeLLM(FrameProcessor): cleaned = _clean_spoken_text(text_line) if cleaned: chunks.append(cleaned) - await self.push_frame(LLMTextFrame(cleaned)) await proc.wait() await stderr_task + full_text = _clean_spoken_text(" ".join(chunks)) + if full_text: + await self.push_frame(LLMTextFrame(full_text)) + except asyncio.CancelledError: logger.info("OpenCode turn cancelled mid-response.") if proc and proc.returncode is None: