feat(webui): improve beta turn completion and streaming UX

This commit is contained in:
ramonpaolo authored and Xubin Ren committed 2026-05-03 22:28:40 +08:00
1 parent 5853d5dfda
commit 76e3f74df7
18 files changed
+850 -28

No files matched your search

+7
View File
@@ -796,6 +796,13 @@ class AgentLoop:
channel=msg.channel, chat_id=msg.chat_id,
content="", metadata=msg.metadata or {},
))
# Signal that the turn is fully complete (all tools executed,
# final text streamed). This lets WS clients know when to
# definitively stop the loading indicator.
await self.bus.publish_outbound(OutboundMessage(
channel=msg.channel, chat_id=msg.chat_id,
content="", metadata={**msg.metadata, "_turn_end": True},
))
except asyncio.CancelledError:
logger.info("Task cancelled for session {}", session_key)
# Preserve partial context from the interrupted turn so