mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Refresh animated terminal titles without redrawing the TUI (#40618)
## Why Terminal title animations only need to update the title, but each animation tick previously requested a full TUI frame. ## What changed - Track the next terminal title refresh deadline on `ChatWidget`. - Have the foreground event loop refresh the title when that deadline expires. - Clear the deadline when title animations are disabled or the configured title is empty. ## Testing - Verify spinner and action-required animations set the expected refresh deadlines. - Verify refreshing an animated title does not enqueue a TUI draw request. GitOrigin-RevId: 269347cd48de4ad9ba9a0aef9ed105c25d1a7dae
This commit is contained in:
1 parent
ed42068c45
commit
6525b95dae
5 files changed
+56
-12
No files matched your search
@@ -800,6 +800,17 @@ See the Codex keymap documentation for supported actions and examples."
|
||||
}
|
||||
AppRunControl::Continue
|
||||
}
|
||||
() = async {
|
||||
match app.chat_widget.terminal_title_next_refresh {
|
||||
Some(deadline) => {
|
||||
tokio::time::sleep_until(tokio::time::Instant::from_std(deadline)).await;
|
||||
}
|
||||
None => std::future::pending().await,
|
||||
}
|
||||
} => {
|
||||
app.chat_widget.refresh_terminal_title();
|
||||
AppRunControl::Continue
|
||||
}
|
||||
};
|
||||
if App::should_stop_waiting_for_initial_session(
|
||||
waiting_for_initial_session_configured,
|
||||
|
||||
Reference in new issue
Block a user