mirror of
https://github.com/EKKOLearnAI/hermes-web-ui.git
synced 2026-05-26 14:00:14 +00:00
a948eee4b9
* fix(chat): isolate concurrent session events by refactoring WebSocket event handling Refactored the WebSocket event handling mechanism to use global listeners with session-specific event routing instead of per-session listeners. This prevents event cross-talk when multiple chat sessions run concurrently. Key changes: - Client: Added sessionEventHandlers Map to route events to appropriate sessions - Client: Registered global listeners once per socket connection - Server: Extracted message processing logic into handleMessage method - Server: Improved Hermes session ID tracking with dedicated Map - Server: Added replaceByHermesSessionId for targeted message replacement Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: fix failing tests for mocks and API return types - Fixed sessions-routes.test.ts: added missing setWorkspace and listWorkspaceFolders mocks - Fixed usage-store.test.ts: removed test for non-existent initUsageStore function - Fixed profiles-store.test.ts: corrected createProfile API return type to { success: true } - Fixed syntax error in usageStatsMock (ctx.body: → ctx.body =) All tests now pass (314 passed | 2 skipped). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>