MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / stopChatGptOAuthServer

Function stopChatGptOAuthServer

cli/src/utils/chatgpt-oauth.ts:110–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 5

ChatGptConnectBannerFunction · 0.90
handleChatGptAuthCodeFunction · 0.90
startCallbackServerFunction · 0.85
connectChatGptOAuthFunction · 0.85
disconnectChatGptOAuthFunction · 0.85

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected