mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 03:15:06 +08:00
Replace Server-Sent Events (SSE) with WebSocket for pipeline debugging to support bidirectional real-time communication and resolve timeout limitations. ## Backend Changes - Add WebSocketConnectionPool for managing client connections - Implement WebSocket route handler at /api/v1/pipelines/<uuid>/chat/ws - Modify WebChatAdapter to broadcast messages via WebSocket - Support both legacy SSE and new WebSocket simultaneously - Maintain person/group session isolation ## Frontend Changes - Create PipelineWebSocketClient for WebSocket communication - Update DebugDialog to use WebSocket instead of SSE - Support auto-reconnection and connection status tracking - Remove streaming toggle (WebSocket always supports streaming) ## Key Features - Eliminates 120-second timeout limitation - Supports multiple messages per request - Enables backend push notifications (plugins) - Maintains session isolation (person vs group) - Backward compatible with SSE during transition 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>