Somna AI - Connection Guide =========================== 1. Backend URLs: - API Base URL: http://localhost:3000 (or your configured HOST:PORT) - Socket.io URL: ws://localhost:3000 (or your configured HOST:PORT) - Static Web UI: http://localhost:3000/index.html 2. Connecting from the Frontend: - By default, the frontend connects to the current host. - If the backend is running on a different server, open the "Backend Config" section in the sidebar. - Enter the full URL (e.g., http://192.168.1.10:3000) and click "Применить и переподключить". 3. Socket.io Events: - 'join_chat': { sessionId: string, userId: string } - Join or resume session. - 'send_message': { content: string, sessionId: string } - Send user message. - 'typing': { isTyping: boolean } - Notify typing status. - 'clear_history': Clear session history. 4. API Endpoints: - POST /chat/message: Send a message via REST (if needed). - GET /chat/history/:sessionId: Get session history.