mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-02-04 18:06:48 +00:00
Task 5: Frontend WebSocket Hook - Creates React hook for bidirectional chat WebSocket - Handles token streaming with proper state accumulation - Manages conversation history (user + assistant messages) - Prevents memory leaks with isMounted check - Proper cleanup on unmount - Type-safe Message interface Validated: - No React dependency issues (removed currentStreamingText from deps) - No stale closure bugs (using ref for streaming text) - Proper mounted state tracking - Lint passes with no errors - TypeScript types correctly defined - WebSocket cleanup on unmount ~100 lines