Skip to content

Commit 1159eaf

Browse files
authored
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).
1 parent e81327e commit 1159eaf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

codex-rs/exec/src/event_processor.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@ impl EventProcessor {
120120
/// for the session. This mirrors the information shown in the TUI welcome
121121
/// screen.
122122
pub(crate) fn print_config_summary(&mut self, config: &Config, prompt: &str) {
123-
ts_println!(self, "OpenAI Codex (research preview)\n--------");
123+
const VERSION: &str = env!("CARGO_PKG_VERSION");
124+
ts_println!(
125+
self,
126+
"OpenAI Codex v{} (research preview)\n--------",
127+
VERSION
128+
);
124129

125130
let entries = vec![
126131
("workdir", config.cwd.display().to_string()),

codex-rs/tui/src/history_cell.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,13 @@ impl HistoryCell {
130130
history_entry_count: _,
131131
} = event;
132132
if is_first_event {
133+
const VERSION: &str = env!("CARGO_PKG_VERSION");
134+
133135
let mut lines: Vec<Line<'static>> = vec![
134136
Line::from(vec![
135137
"OpenAI ".into(),
136138
"Codex".bold(),
139+
format!(" v{}", VERSION).into(),
137140
" (research preview)".dim(),
138141
]),
139142
Line::from(""),

0 commit comments

Comments
 (0)