Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: announcement in prio (#10783)

jif-oaiddd09a9368b7
diff --git a/codex-rs/tui/src/tooltips.rs b/codex-rs/tui/src/tooltips.rs
index b62831e7e6..7365c16496 100644
--- a/codex-rs/tui/src/tooltips.rs
+++ b/codex-rs/tui/src/tooltips.rs
@@ -39,6 +39,10 @@ fn experimental_tooltips() -> Vec<&'static str> {
pub(crate) fn get_tooltip(plan: Option<PlanType>) -> Option<String> {
let mut rng = rand::rng();
+ if let Some(announcement) = announcement::fetch_announcement_tip() {
+ return Some(announcement);
+ }
+
// Leave small chance for a random tooltip to be shown.
if rng.random_ratio(8, 10) {
match plan {
@@ -56,10 +60,6 @@ pub(crate) fn get_tooltip(plan: Option<PlanType>) -> Option<String> {
}
}
- if let Some(announcement) = announcement::fetch_announcement_tip() {
- return Some(announcement);
- }
-
pick_tooltip(&mut rng).map(str::to_string)
}