Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

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

Michael Bolin1159eaf04f26
diff --git a/codex-rs/exec/src/event_processor.rs b/codex-rs/exec/src/event_processor.rs
index 89ad7d7cde..5462736b5f 100644
--- a/codex-rs/exec/src/event_processor.rs
+++ b/codex-rs/exec/src/event_processor.rs
@@ -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()),
diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs
index 41c2049313..b41c8ac62b 100644
--- a/codex-rs/tui/src/history_cell.rs
+++ b/codex-rs/tui/src/history_cell.rs
@@ -130,10 +130,13 @@ impl HistoryCell {
history_entry_count: _,
} = event;
if is_first_event {
+ const VERSION: &str = env!("CARGO_PKG_VERSION");
+
let mut lines: Vec<Line<'static>> = vec![
Line::from(vec![
"OpenAI ".into(),
"Codex".bold(),
+ format!(" v{}", VERSION).into(),
" (research preview)".dim(),
]),
Line::from(""),