- File Transfer Integration: Refactored file transfer system initialization with better error handling and automatic retry mechanisms - Message Filtering: Added comprehensive message filtering system to prevent file transfer and system messages from appearing in chat UI - Callback System: Simplified file transfer callback system - removed progress notifications from chat to reduce noise - System Message Deduplication: Implemented notification flags to prevent duplicate system messages (verification, security upgrades, etc.) - Error Handling: Enhanced error handling with graceful fallbacks instead of throwing exceptions that could break connections - UI Message Delivery: Added `deliverMessageToUI()` method with built-in filtering for system/file messages - DataChannel Event Handling: Improved onmessage handler with early filtering for file transfer messages - Global Integration: Better integration with global file transfer system (`window.fileTransferSystem`) - Connection Stability: Removed aggressive reconnection attempts that could cause session closure - Debug Logging: Enhanced debug logging for better troubleshooting - File transfer messages now bypass chat UI entirely - System messages are deduplicated using internal flags - Better separation of concerns between WebRTC and file transfer systems - More robust initialization sequence with proper cleanup - Improved message routing and processing pipeline - Fixed duplicate system notifications - Resolved file transfer message leakage into chat - Improved connection state management - Better handling of initialization race conditions
206 KiB
206 KiB