mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
fix: announcement in prio (#10783)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user