(sessionId: string)
| 168 | } |
| 169 | |
| 170 | async getSession(sessionId: string): Promise<{ session: ChatSession; messages: ChatMessage[] }> { |
| 171 | try { |
| 172 | const response = await fetch(`${API_BASE_URL}/sessions/${sessionId}`); |
| 173 | if (!response.ok) { |
| 174 | throw new Error(`Failed to get session: ${response.status}`); |
| 175 | } |
| 176 | return await response.json(); |
| 177 | } catch (error) { |
| 178 | console.error('Get session failed:', error); |
| 179 | throw error; |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | async sendSessionMessage( |
| 184 | sessionId: string, |
no outgoing calls
no test coverage detected