// Runs in oauth.html, the page Hugging Face redirects the sign-in popup to. import { completeSignIn } from "./hf-auth.js"; const title = document.getElementById("title"); const msg = document.getElementById("msg"); try { const r = await completeSignIn(); title.textContent = `Signed in${r.name ? ` as ${r.name}` : ""}`; title.className = "ok"; msg.textContent = "You can close this window and go back to LocalWebAgent."; setTimeout(() => window.close(), 700); } catch (err) { title.textContent = "Sign-in didn't work"; title.className = "bad"; msg.textContent = err.message; }