fix(cli): print response text when streaming fails in interactive mode

This commit is contained in:
Kenneth Zhao
2026-07-06 15:28:10 +08:00
committed by Xubin Ren
parent dd014b50a7
commit 105230cc34
+11
View File
@@ -1938,6 +1938,17 @@ def agent(
)
continue
if isinstance(event, StreamedResponseEvent):
if msg.content and renderer and not renderer.streamed:
await renderer.close()
print_kwargs: dict[str, Any] = {}
if renderer.header_printed:
print_kwargs["show_header"] = False
_print_agent_response(
msg.content,
render_markdown=markdown,
metadata=msg.metadata,
**print_kwargs,
)
turn_done.set()
continue