Added CLI version to /status output (#3223)

This PR adds the CLI version to the `/status` output.

This addresses feature request #2767
This commit is contained in:
Eric Traut
2025-09-05 16:27:31 -07:00
committed by GitHub
parent 6cfc012e9d
commit 45c3b20041
4 changed files with 12 additions and 2 deletions

View File

@@ -11,6 +11,8 @@ use std::path::PathBuf;
use codex_core::config::Config;
use codex_core::default_client::create_client;
use crate::version::CODEX_CLI_VERSION;
pub fn get_upgrade_version(config: &Config) -> Option<String> {
let version_file = version_filepath(config);
let info = read_version_info(&version_file).ok();
@@ -31,8 +33,7 @@ pub fn get_upgrade_version(config: &Config) -> Option<String> {
}
info.and_then(|info| {
let current_version = env!("CARGO_PKG_VERSION");
if is_newer(&info.latest_version, current_version).unwrap_or(false) {
if is_newer(&info.latest_version, CODEX_CLI_VERSION).unwrap_or(false) {
Some(info.latest_version)
} else {
None