()
| 311 | } |
| 312 | |
| 313 | async function checkOAuthStatus() { |
| 314 | try { |
| 315 | const res = await fetch("/api/oauth/status"); |
| 316 | const { connected } = await res.json(); |
| 317 | updateOAuthUI(connected); |
| 318 | state.config.oauthConnected = connected; |
| 319 | updateApiKeyButton(); |
| 320 | refreshWebSocketConnectionPreference(); |
| 321 | } catch (err) { |
| 322 | console.error("Failed to check OAuth status:", err); |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | function pollOAuthStatus() { |
| 327 | const interval = setInterval(async () => { |
no test coverage detected