feat: show the version when starting Codex (#1182)

The TypeScript version of the CLI shows the version when it starts up,
which is helpful when users share screenshots (and nice to know, as a
user).
This commit is contained in:
Michael Bolin
2025-05-30 23:24:36 -07:00
committed by GitHub
parent e81327e5f4
commit 1159eaf04f
2 changed files with 9 additions and 1 deletions

View File

@@ -120,7 +120,12 @@ impl EventProcessor {
/// for the session. This mirrors the information shown in the TUI welcome
/// screen.
pub(crate) fn print_config_summary(&mut self, config: &Config, prompt: &str) {
ts_println!(self, "OpenAI Codex (research preview)\n--------");
const VERSION: &str = env!("CARGO_PKG_VERSION");
ts_println!(
self,
"OpenAI Codex v{} (research preview)\n--------",
VERSION
);
let entries = vec![
("workdir", config.cwd.display().to_string()),