From f8e3c57975a91da700a1fc19e4b0c789d30bffdd Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Mon, 17 Nov 2025 11:01:18 -0800 Subject: [PATCH] remove unecessary config.toml + fmt --- codex-rs/tui/config.toml | 2 -- codex-rs/tui/src/chatwidget.rs | 11 ++++------- 2 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 codex-rs/tui/config.toml diff --git a/codex-rs/tui/config.toml b/codex-rs/tui/config.toml deleted file mode 100644 index ca4c341c5d..0000000000 --- a/codex-rs/tui/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[projects."/Users/zhao/code/codex"] -trust_level = "untrusted" diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 1c67d87b68..c2b04f020c 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -1730,13 +1730,10 @@ impl ChatWidget { } else { (&default_usage, Some(&default_usage)) }; - let rate_limit_snapshot = self - .fetch_rate_limits_from_usage() - .or_else(|| self.rate_limit_snapshot.clone()); - if let Some(snapshot) = rate_limit_snapshot.clone() { - self.rate_limit_snapshot = Some(snapshot); - } + self.rate_limit_snapshot = self + .fetch_rate_limits_from_usage() + .or(self.rate_limit_snapshot.clone()); self.add_to_history(crate::status::new_status_output( &self.config, @@ -1744,7 +1741,7 @@ impl ChatWidget { total_usage, context_usage, &self.conversation_id, - rate_limit_snapshot.as_ref(), + self.rate_limit_snapshot.as_ref(), Local::now(), )); }