mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-23 17:31:33 +08:00
fix(api/v2): restore "end" side-channel event in AG-UI workflow stream
The durable background-execution rewrite of workflow.py reverted `side_channel_events` to its pre-"end" form, dropping the "end" event from the AG-UI side-channel. That event carries `build_duration` to the playground chat-view, and the message metadata badge only renders when `hasDuration || hasTokens`. With build_duration gone the badge vanished, failing the token-usage and shareable-playground "Finished In" regression tests. Re-add "end" so the streaming playground path delivers it again.
This commit is contained in:
@ -658,7 +658,7 @@ async def _stream_event_frames(
|
||||
# side-channel ``CustomEvent``; emitted only when the wire protocol is
|
||||
# AG-UI. A follow-up retires this once chat-view consumes AG-UI primitives.
|
||||
emit_side_channel = adapter.name == "agui"
|
||||
side_channel_events = frozenset({"add_message", "token", "remove_message", "error"})
|
||||
side_channel_events = frozenset({"add_message", "token", "remove_message", "error", "end"})
|
||||
|
||||
seq = 0
|
||||
run_task = asyncio.create_task(drive())
|
||||
|
||||
Reference in New Issue
Block a user