fix(cli): prevent TUI content duplication via transient Live and renderer routing

Route progress output through the Live's render hook to fix cursor
misalignment that caused content duplication.  The root cause was that
progress/reasoning output used a separate Console instance, bypassing
Rich Live's process_renderables hook.  Also fixes pre-existing issue
where multiple headers printed per agent turn.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Flinn Xie
2026-05-11 01:02:49 +08:00
co-authored by Claude Opus 4.7
parent 7c1aa5ae31
commit d630ac90d1
3 changed files with 88 additions and 46 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ async def test_interactive_retry_wait_is_rendered_as_progress_even_when_progress
metadata={"_retry_wait": True},
)
async def fake_print(text: str, active_thinking: object | None) -> None:
async def fake_print(text: str, active_thinking: object | None, renderer=None) -> None:
calls.append((text, active_thinking))
with patch("nanobot.cli.commands._print_interactive_progress_line", side_effect=fake_print):