From efe7f3c79335d31e6a82feb2d3c22868d2999ab0 Mon Sep 17 00:00:00 2001 From: easong-openai Date: Tue, 29 Jul 2025 09:23:09 -0700 Subject: [PATCH] alternate login wording? (#1723) Co-authored-by: Jeremy Rose <172423086+nornagon-openai@users.noreply.github.com> --- codex-rs/tui/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index 1f660b1a..f93c0a2b 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -144,22 +144,20 @@ pub async fn run_main( let show_login_screen = should_show_login_screen(&config).await; if show_login_screen { - std::io::stdout().write_all( - b"Oh dear, we don't seem to have an API key.\nTerribly sorry, but may I open a browser window for you to log in? [Yn] ", - )?; + std::io::stdout() + .write_all(b"No API key detected.\nLogin with your ChatGPT account? [Yn] ")?; std::io::stdout().flush()?; let mut input = String::new(); std::io::stdin().read_line(&mut input)?; let trimmed = input.trim(); if !(trimmed.is_empty() || trimmed.eq_ignore_ascii_case("y")) { - std::io::stdout().write_all(b"Right-o, fair enough. See you next time!\n")?; std::process::exit(1); } // Spawn a task to run the login command. // Block until the login command is finished. let new_key = codex_login::login_with_chatgpt(&config.codex_home, false).await?; set_openai_api_key(new_key); - std::io::stdout().write_all(b"Excellent, looks like that worked. Let's get started!\n")?; + std::io::stdout().write_all(b"Login successful.\n")?; } // Determine whether we need to display the "not a git repo" warning