pub fn login(tel: Option<&Arc<Telemetry>>) -> Result<AuthInfo>Expand description
Stdout-driven OAuth login: prints the URL, opens the browser,
polls /auth/check with stdin-driven ESC cancel. Used by the CLI
(atomcode login, atomcode codingplan) and by setup.rs’s
step_login when the TUI hasn’t already pre-flighted login.
TUI callers should NOT use this — render via start_login() +
LoginSession::poll_once() so the input box stays visible and ESC
is captured through input_rx (no termios manipulation needed).
tel is optional so non-CLI callers (tests, coding_plan setup) can
pass None when they don’t hold a telemetry handle.