MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / refreshWebSocketConnectionPreference

Function refreshWebSocketConnectionPreference

web/js/chat.js:237–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235}
236
237export function refreshWebSocketConnectionPreference() {
238 shouldMaintainWs = hasConfiguredWebAuth();
239
240 if (shouldMaintainWs) {
241 void ensureBackgroundWsConnection();
242 return;
243 }
244
245 clearReconnectTimer();
246 if (ws && ws.readyState === WebSocket.OPEN) {
247 ws.close();
248 }
249}
250
251async function getOrCreateWs(options = {}) {
252 const { background = false } = options;

Callers 4

handleSaveFunction · 0.90
handleOAuthLogoutFunction · 0.90
checkOAuthStatusFunction · 0.90
pollOAuthStatusFunction · 0.90

Calls 3

hasConfiguredWebAuthFunction · 0.85
clearReconnectTimerFunction · 0.85

Tested by

no test coverage detected