()
| 108 | let callbackServer: http.Server | null = null |
| 109 | |
| 110 | export function stopChatGptOAuthServer(): void { |
| 111 | if (callbackServer) { |
| 112 | try { callbackServer.close() } catch { /* ignore */ } |
| 113 | callbackServer = null |
| 114 | } |
| 115 | pendingCodeVerifier = null |
| 116 | pendingState = null |
| 117 | } |
| 118 | |
| 119 | function escapeHtml(s: string): string { |
| 120 | return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''') |
no test coverage detected