Lightweight coding agent that runs in your terminal
Rust
Update copy (#1935)
Ed Bayes1e4bf816531b
diff --git a/codex-cli/src/components/chat/terminal-chat-input.tsx b/codex-cli/src/components/chat/terminal-chat-input.tsxindex c8c5bf8216..66428f8463 100644--- a/codex-cli/src/components/chat/terminal-chat-input.tsx+++ b/codex-cli/src/components/chat/terminal-chat-input.tsx@@ -854,7 +854,7 @@ export default function TerminalChatInput({/>) : (<Text dimColor>- ctrl+c to exit | "/" to see commands | enter to send+ Ctrl+C to exit | "/" to see commands | Enter to send{contextLeftPercent > 25 && (<>{" — "}diff --git a/codex-cli/src/components/help-overlay.tsx b/codex-cli/src/components/help-overlay.tsxindex d302f7551e..1c24ad9c72 100644--- a/codex-cli/src/components/help-overlay.tsx+++ b/codex-cli/src/components/help-overlay.tsx@@ -96,7 +96,7 @@ export default function HelpOverlay({</Box><Box paddingX={1}>- <Text dimColor>esc or q to close</Text>+ <Text dimColor>Esc or q to close</Text></Box></Box>);diff --git a/codex-cli/src/utils/get-api-key-components.tsx b/codex-cli/src/utils/get-api-key-components.tsxindex 45346632c4..d23b661126 100644--- a/codex-cli/src/utils/get-api-key-components.tsx+++ b/codex-cli/src/utils/get-api-key-components.tsx@@ -68,7 +68,7 @@ export function WaitingForAuth(): JSX.Element {<Spinner type="ball" /><Text>{" "}- Waiting for authentication… <Text dimColor>ctrl + c to quit</Text>+ Waiting for authentication… <Text dimColor>Ctrl + C to quit</Text></Text></Box>);diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rsindex e53fe03676..3be3f14d6f 100644--- a/codex-rs/tui/src/bottom_pane/chat_composer.rs+++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs@@ -31,7 +31,7 @@ use crate::bottom_pane::textarea::TextAreaState;use codex_file_search::FileMatch;use std::cell::RefCell;-const BASE_PLACEHOLDER_TEXT: &str = "...";+const BASE_PLACEHOLDER_TEXT: &str = "Ask Codex to do anything";/// If the pasted content exceeds this number of characters, replace it with a/// placeholder in the UI.const LARGE_PASTE_CHAR_THRESHOLD: usize = 1000;diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__empty.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__empty.snapindex 7a1a7f4ef3..de227a3071 100644--- a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__empty.snap+++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__empty.snap@@ -2,7 +2,7 @@source: tui/src/bottom_pane/chat_composer.rsexpression: terminal.backend()----"▌ ... "+"▌ Ask Codex to do anything ""▌ ""▌ ""▌ "diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rsindex 903e3087aa..d0be52a472 100644--- a/codex-rs/tui/src/history_cell.rs+++ b/codex-rs/tui/src/history_cell.rs@@ -196,12 +196,11 @@ impl HistoryCell {Span::raw(format!(" {cwd_str}")).dim(),]),Line::from("".dim()),- Line::from(" Try one of the following commands to get started:".dim()),+ Line::from(" To get started, describe a task or try one of these commands:".dim()),Line::from("".dim()),- Line::from(format!(" 1. /init - {}", SlashCommand::Init.description()).dim()),- Line::from(format!(" 2. /status - {}", SlashCommand::Status.description()).dim()),- Line::from(format!(" 3. /compact - {}", SlashCommand::Compact.description()).dim()),- Line::from(format!(" 4. /new - {}", SlashCommand::New.description()).dim()),+ Line::from(format!(" /init - {}", SlashCommand::Init.description()).dim()),+ Line::from(format!(" /status - {}", SlashCommand::Status.description()).dim()),+ Line::from(format!(" /diff - {}", SlashCommand::Diff.description()).dim()),Line::from("".dim()),];HistoryCell::WelcomeMessage {diff --git a/codex-rs/tui/src/onboarding/auth.rs b/codex-rs/tui/src/onboarding/auth.rsindex b91bf4a0d9..397ba76890 100644--- a/codex-rs/tui/src/onboarding/auth.rs+++ b/codex-rs/tui/src/onboarding/auth.rs@@ -104,7 +104,14 @@ impl AuthModeWidget {Line::from(vec![Span::raw("> "),Span::styled(- "Sign in with your ChatGPT account?",+ "Sign in with ChatGPT to use Codex as part of your paid plan",+ Style::default().add_modifier(Modifier::BOLD),+ ),+ ]),+ Line::from(vec![+ Span::raw(" "),+ Span::styled(+ "or connect an API key for usage-based billing",Style::default().add_modifier(Modifier::BOLD),),]),@@ -145,18 +152,18 @@ impl AuthModeWidget {lines.extend(create_mode_item(0,AuthMode::ChatGPT,- "Sign in with ChatGPT or create a new account",- "Leverages your plan, starting at $20 a month for Plus",+ "Sign in with ChatGPT",+ "Usage included with Plus, Pro, and Team plans",));lines.extend(create_mode_item(1,AuthMode::ApiKey,"Provide your own API key",- "Pay only for what you use",+ "Pay for what you use",));lines.push(Line::from(""));lines.push(- Line::from("Press Enter to continue")+ Line::from(" Press Enter to continue").style(Style::default().add_modifier(Modifier::DIM)),);if let Some(err) = &self.error {@@ -179,8 +186,7 @@ impl AuthModeWidget {let lines = vec![Line::from(spans),Line::from(""),- Line::from(" Press Escape to cancel")- .style(Style::default().add_modifier(Modifier::DIM)),+ Line::from(" Press Esc to cancel").style(Style::default().add_modifier(Modifier::DIM)),];Paragraph::new(lines).wrap(Wrap { trim: false })@@ -194,17 +200,30 @@ impl AuthModeWidget {Line::from(""),Line::from("> Before you start:"),Line::from(""),- Line::from(" Codex can make mistakes"),- Line::from(" Check important info")- .style(Style::default().add_modifier(Modifier::DIM)),+ Line::from(" Decide how much autonomy you want to grant Codex"),+ Line::from(vec![+ Span::raw(" For more details see the "),+ Span::styled(+ "\u{1b}]8;;https://github.com/openai/codex\u{7}Codex docs\u{1b}]8;;\u{7}",+ Style::default().add_modifier(Modifier::UNDERLINED),+ ),+ ])+ .style(Style::default().add_modifier(Modifier::DIM)),Line::from(""),- Line::from(" Due to prompt injection risks, only use it with code you trust"),- Line::from(" For more details see https://github.com/openai/codex")+ Line::from(" Codex can make mistakes")+ .style(Style::default().fg(Color::White)),+ Line::from(" Review the code it writes and commands it runs").style(Style::default().add_modifier(Modifier::DIM)),Line::from(""),Line::from(" Powered by your ChatGPT account"),- Line::from(" Uses your plan's rate limits and training data preferences")- .style(Style::default().add_modifier(Modifier::DIM)),+ Line::from(vec![+ Span::raw(" Uses your plan's rate limits and "),+ Span::styled(+ "\u{1b}]8;;https://chatgpt.com/#settings\u{7}training data preferences\u{1b}]8;;\u{7}",+ Style::default().add_modifier(Modifier::UNDERLINED),+ ),+ ])+ .style(Style::default().add_modifier(Modifier::DIM)),Line::from(""),Line::from(" Press Enter to continue").style(Style::default().fg(LIGHT_BLUE)),];@@ -236,7 +255,10 @@ impl AuthModeWidget {fn render_env_var_missing(&self, area: Rect, buf: &mut Buffer) {let lines = vec![- Line::from("✘ OPENAI_API_KEY not found").style(Style::default().fg(Color::Red)),+ Line::from(+ " To use Codex with the OpenAI API, set OPENAI_API_KEY in your environment",+ )+ .style(Style::default().fg(Color::Blue)),Line::from(""),Line::from(" Press Enter to return").style(Style::default().add_modifier(Modifier::DIM)),diff --git a/codex-rs/tui/src/onboarding/welcome.rs b/codex-rs/tui/src/onboarding/welcome.rsindex a35f6528ab..bcdc5c9aae 100644--- a/codex-rs/tui/src/onboarding/welcome.rs+++ b/codex-rs/tui/src/onboarding/welcome.rs@@ -18,9 +18,9 @@ pub(crate) struct WelcomeWidget {impl WidgetRef for &WelcomeWidget {fn render_ref(&self, area: Rect, buf: &mut Buffer) {let line = Line::from(vec![- Span::raw("> "),+ Span::raw(">_ "),Span::styled(- "Welcome to Codex, OpenAI's coding agent that runs in your terminal",+ "Welcome to Codex, OpenAI's command-line coding agent",Style::default().add_modifier(Modifier::BOLD),),]);diff --git a/codex-rs/tui/src/slash_command.rs b/codex-rs/tui/src/slash_command.rsindex 0513d64443..ba24ead4f9 100644--- a/codex-rs/tui/src/slash_command.rs+++ b/codex-rs/tui/src/slash_command.rs@@ -27,15 +27,15 @@ impl SlashCommand {/// User-visible description shown in the popup.pub fn description(self) -> &'static str {match self {- SlashCommand::New => "Start a new chat",- SlashCommand::Init => "Create an AGENTS.md file with instructions for Codex",- SlashCommand::Compact => "Compact the chat history",- SlashCommand::Quit => "Exit the application",- SlashCommand::Diff => "Show git diff (including untracked files)",- SlashCommand::Status => "Show current session configuration and token usage",- SlashCommand::Logout => "Log out of Codex",+ SlashCommand::New => "start a new chat during a conversation",+ SlashCommand::Init => "create an AGENTS.md file with instructions for Codex",+ SlashCommand::Compact => "summarize conversation to prevent hitting the context limit",+ SlashCommand::Quit => "exit Codex",+ SlashCommand::Diff => "show git diff (including untracked files)",+ SlashCommand::Status => "show current session configuration and token usage",+ SlashCommand::Logout => "log out of Codex",#[cfg(debug_assertions)]- SlashCommand::TestApproval => "Test approval request",+ SlashCommand::TestApproval => "test approval request",}}diff --git a/codex-rs/tui/src/status_indicator_widget.rs b/codex-rs/tui/src/status_indicator_widget.rsindex dcb8a5fdbe..513422bb4c 100644--- a/codex-rs/tui/src/status_indicator_widget.rs+++ b/codex-rs/tui/src/status_indicator_widget.rs@@ -238,7 +238,7 @@ impl WidgetRef for StatusIndicatorWidget {Style::default().fg(Color::Gray).add_modifier(Modifier::DIM),));spans.push(Span::styled(- "Ctrl c",+ "Ctrl C",Style::default().fg(Color::Gray).add_modifier(Modifier::DIM | Modifier::BOLD),