* Get session stats for debugging.
()
| 163 | * Get session stats for debugging. |
| 164 | */ |
| 165 | getStats(): { count: number; sessions: Array<{ id: string; model: string; age: number }> } { |
| 166 | const now = Date.now(); |
| 167 | const sessions = Array.from(this.sessions.entries()).map(([id, entry]) => ({ |
| 168 | id: id.slice(0, 8) + "...", |
| 169 | model: entry.model, |
| 170 | age: Math.round((now - entry.createdAt) / 1000), |
| 171 | })); |
| 172 | return { count: this.sessions.size, sessions }; |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * Clean up expired sessions. |
no outgoing calls
no test coverage detected