From bbcfd63aba624adbfdaea878483c0608390a074b Mon Sep 17 00:00:00 2001 From: HaxagonusD Date: Thu, 28 Aug 2025 21:12:41 -0400 Subject: [PATCH] UI: Make slash commands bold in welcome message (#2762) ## What Make slash commands (/init, /status, /approvals, /model) bold and white in the welcome message for better visibility. image ## Why The current welcome message displays all text in a dimmed style, making the slash commands less prominent. Users need to quickly identify available commands when starting Codex. ## How Modified `tui/src/history_cell.rs` in the `new_session_info` function to: - Split each command line into separate spans - Apply bold white styling to command text (`/init`, `/status`, etc.) - Keep descriptions dimmed for visual contrast - Maintain existing layout and spacing ## Test plan - [ ] Run the TUI and verify commands appear bold in the welcome message - [ ] Ensure descriptions remain dimmed for readability - [ ] Confirm all existing tests pass --- codex-rs/tui/src/history_cell.rs | 52 +++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 6d059a4c..cc05b36f 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -276,10 +276,54 @@ pub(crate) fn new_session_info( Line::from("".dim()), Line::from(" To get started, describe a task or try one of these commands:".dim()), Line::from("".dim()), - Line::from(format!(" /init - {}", SlashCommand::Init.description()).dim()), - Line::from(format!(" /status - {}", SlashCommand::Status.description()).dim()), - Line::from(format!(" /approvals - {}", SlashCommand::Approvals.description()).dim()), - Line::from(format!(" /model - {}", SlashCommand::Model.description()).dim()), + Line::from(vec![ + Span::styled( + " /init", + Style::default() + .add_modifier(Modifier::BOLD) + .fg(Color::White), + ), + Span::styled( + format!(" - {}", SlashCommand::Init.description()), + Style::default().dim(), + ), + ]), + Line::from(vec![ + Span::styled( + " /status", + Style::default() + .add_modifier(Modifier::BOLD) + .fg(Color::White), + ), + Span::styled( + format!(" - {}", SlashCommand::Status.description()), + Style::default().dim(), + ), + ]), + Line::from(vec![ + Span::styled( + " /approvals", + Style::default() + .add_modifier(Modifier::BOLD) + .fg(Color::White), + ), + Span::styled( + format!(" - {}", SlashCommand::Approvals.description()), + Style::default().dim(), + ), + ]), + Line::from(vec![ + Span::styled( + " /model", + Style::default() + .add_modifier(Modifier::BOLD) + .fg(Color::White), + ), + Span::styled( + format!(" - {}", SlashCommand::Model.description()), + Style::default().dim(), + ), + ]), ]; PlainHistoryCell { lines } } else if config.model == model {