check for updates (#1764)

1. Ping https://api.github.com/repos/openai/codex/releases/latest (at
most once every 20 hrs)
2. Store the result in ~/.codex/version.jsonl
3. If CARGO_PKG_VERSION < latest_version, print a message at boot.

---------

Co-authored-by: easong-openai <easong@openai.com>
This commit is contained in:
Jeremy Rose
2025-08-01 17:31:38 -07:00
committed by GitHub
parent 929ba50adc
commit 7e0f506da2
5 changed files with 181 additions and 0 deletions

3
codex-rs/Cargo.lock generated
View File

@@ -843,6 +843,7 @@ version = "0.0.0"
dependencies = [
"anyhow",
"base64 0.22.1",
"chrono",
"clap",
"codex-ansi-escape",
"codex-arg0",
@@ -861,6 +862,8 @@ dependencies = [
"ratatui",
"ratatui-image",
"regex-lite",
"reqwest",
"serde",
"serde_json",
"shlex",
"strum 0.27.2",