fix(cli): print response text when streaming fails in interactive mode
This commit is contained in:
@@ -1938,6 +1938,17 @@ def agent(
|
|||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
if isinstance(event, StreamedResponseEvent):
|
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()
|
turn_done.set()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user