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: