fix: nested button, empty options fallback, skip intermediate tool_calls

This commit is contained in:
CREDO23 2026-04-07 18:12:34 +02:00
parent 5f354ef6ac
commit 60b9f0f21c
2 changed files with 16 additions and 4 deletions

View file

@ -401,6 +401,8 @@ async def stream_autocomplete_agent(
continue
output = event.get("data", {}).get("output")
if output and hasattr(output, "content"):
if getattr(output, "tool_calls", None):
continue
content = output.content
if content and isinstance(content, str) and not text_buffer:
text_buffer.append(content)