Implement initial greeting emission in DuplexPipeline after session activation, ensuring proper event ordering for frontend notifications.

This commit is contained in:
Xin Wang
2026-02-26 14:07:46 +08:00
parent cfc8db3fe7
commit da83c8ec8a
2 changed files with 52 additions and 29 deletions

View File

@@ -405,6 +405,9 @@ class Session:
)
)
# Emit opener only after frontend has received session.started/config events.
await self.pipeline.emit_initial_greeting()
async def _handle_session_stop(self, reason: Optional[str]) -> None:
"""Handle session stop."""
if self.ws_state == WsSessionState.STOPPED: