mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
## What changed Show the startup tip beneath the session header in the fullscreen transcript, with wrapping on narrow terminals. Remove rotating tips and startup announcements from above the composer, leaving that area for usage warnings. ## Testing Add startup transcript snapshots at 80 and 32 columns and assert that compact tooltip rendering preserves styled links. Update usage-warning tests to verify composer geometry and recovery without rotating tips. GitOrigin-RevId: b5e79a46147d112cd50802b0702537deb9b87001
27 lines
796 B
Rust
27 lines
796 B
Rust
//! Usage warnings appear above the fullscreen composer when no interaction takes priority.
|
|
|
|
use super::*;
|
|
use crate::terminal_hyperlinks::HyperlinkLine;
|
|
|
|
impl App {
|
|
pub(super) fn composer_hint(&self, width: u16) -> Option<HyperlinkLine> {
|
|
if !self.chat_widget.no_modal_or_popup_active()
|
|
|| !self.transcript_view.is_following()
|
|
|| self.transcript_view.has_active_interaction()
|
|
|| self.backtrack.primed
|
|
|| self.backtrack.overlay_preview_active
|
|
{
|
|
return None;
|
|
}
|
|
let width = width.checked_sub(/*rhs*/ 2)?;
|
|
if width == 0 {
|
|
return None;
|
|
}
|
|
self.chat_widget.usage_notice(width).map(HyperlinkLine::new)
|
|
}
|
|
}
|
|
|
|
#[cfg(test)]
|
|
#[path = "composer_hints_tests.rs"]
|
|
mod tests;
|