mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Upgrade Ratatui to 0.30.2 (#35959)
## What changed - Upgrade `ratatui`, `ratatui-macros`, `crossterm`, and `ansi-to-tui`, and adapt the TUI to their updated rendering, backend, color-conversion, and cell APIs. - Use Ratatui's cell-width and continuation-cell metadata when mapping OSC 8 hyperlinks so links remain aligned across wrapped wide glyphs and halfwidth characters with dakuten. - Preserve explicit hyperlinks in the sign-in success screen and empty MCP state without embedding escape sequences in the text passed to Ratatui. ## Testing - Add regression coverage for hyperlink placement across wide glyphs and halfwidth dakuten, hyperlink preservation in onboarding and MCP output, and display-width handling. GitOrigin-RevId: 8460873e5a266923acd0417bc46264845eab0134
This commit is contained in:
1 parent
e1895710ad
commit
00cb5c465b
43 files changed
+1097
-303
No files matched your search
@@ -192,6 +192,7 @@ use ratatui::text::Span;
|
||||
use ratatui::widgets::Block;
|
||||
use ratatui::widgets::Paragraph;
|
||||
use ratatui::widgets::StatefulWidgetRef;
|
||||
use ratatui::widgets::Widget;
|
||||
use ratatui::widgets::WidgetRef;
|
||||
|
||||
use codex_protocol::openai_models::ReasoningEffort;
|
||||
@@ -4665,7 +4666,7 @@ impl ChatComposer {
|
||||
}
|
||||
} else if self.footer.flash_visible() {
|
||||
if let Some(flash) = self.footer.flash.as_ref() {
|
||||
flash.line.render(inset_footer_hint_area(hint_rect), buf);
|
||||
Widget::render(&flash.line, inset_footer_hint_area(hint_rect), buf);
|
||||
}
|
||||
} else if let Some(items) = active_footer_hint_override {
|
||||
render_footer_hint_items(hint_rect, buf, items);
|
||||
@@ -4703,11 +4704,11 @@ impl ChatComposer {
|
||||
}
|
||||
}
|
||||
let style = user_message_style();
|
||||
Block::default().style(style).render_ref(composer_rect, buf);
|
||||
Block::default().style(style).render(composer_rect, buf);
|
||||
if !remote_images_rect.is_empty() {
|
||||
Paragraph::new(self.attachments.remote_image_lines())
|
||||
.style(style)
|
||||
.render_ref(remote_images_rect, buf);
|
||||
.render(remote_images_rect, buf);
|
||||
}
|
||||
if !textarea_rect.is_empty() {
|
||||
let prompt = if self.draft.input_enabled {
|
||||
@@ -4780,8 +4781,7 @@ impl ChatComposer {
|
||||
};
|
||||
if !textarea_rect.is_empty() {
|
||||
let placeholder = Span::from(text).dim();
|
||||
Line::from(vec![placeholder])
|
||||
.render_ref(textarea_rect.inner(Margin::new(0, 0)), buf);
|
||||
Line::from(vec![placeholder]).render(textarea_rect.inner(Margin::new(0, 0)), buf);
|
||||
}
|
||||
}
|
||||
if matches!(self.popups.active, ActivePopup::None)
|
||||
|
||||
@@ -2,7 +2,6 @@ use std::path::PathBuf;
|
||||
|
||||
use ratatui::style::Style;
|
||||
use ratatui::style::Styled;
|
||||
use ratatui::style::Stylize;
|
||||
use ratatui::text::Span;
|
||||
|
||||
const TAG_WIDTH: usize = "Plugin".len();
|
||||
|
||||
Reference in new issue
Block a user