feat: web channel stream chat

This commit is contained in:
zhayujie
2026-02-23 22:19:50 +08:00
parent 9082eec91d
commit c0702c8b36
5 changed files with 461 additions and 49 deletions

View File

@@ -57,11 +57,14 @@ class Channel(object):
if context and "channel_type" not in context:
context["channel_type"] = self.channel_type
# Read on_event callback injected by the channel (e.g. web SSE)
on_event = context.get("on_event") if context else None
# Use agent bridge to handle the query
return Bridge().fetch_agent_reply(
query=query,
context=context,
on_event=None,
on_event=on_event,
clear_history=False
)
except Exception as e: