()
| 8 | |
| 9 | // Convert HTTP URL to WebSocket URL |
| 10 | const getWebSocketUrl = () => { |
| 11 | const baseUrl = SERVER_BASE_URL; |
| 12 | // Replace http:// with ws:// or https:// with wss:// |
| 13 | const wsBaseUrl = baseUrl.replace(/^http/, 'ws'); |
| 14 | return `${wsBaseUrl}/ws/chat`; |
| 15 | }; |
| 16 | |
| 17 | export interface ChatMessage { |
| 18 | role: 'user' | 'assistant' | 'system'; |
no outgoing calls
no test coverage detected