Aggregate turn text into a complete LLMTextFrame to prevent TTS sentence truncation

This commit is contained in:
Adolfo Reyna
2026-08-07 20:14:38 -04:00
parent ba16e9ca27
commit 87b54ce8f4
+4 -1
View File
@@ -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: