prefer ratatui Stylized for constructing lines/spans (#3068)

no functional change, just simplifying ratatui styling and adding
guidance in AGENTS.md for future.
This commit is contained in:
Jeremy Rose
2025-09-02 16:19:54 -07:00
committed by GitHub
parent 0d5ffb000e
commit 578ff09e17
18 changed files with 203 additions and 311 deletions

View File

@@ -9,7 +9,7 @@ use ratatui::text::Text;
pub fn ansi_escape_line(s: &str) -> Line<'static> {
let text = ansi_escape(s);
match text.lines.as_slice() {
[] => Line::from(""),
[] => "".into(),
[only] => only.clone(),
[first, rest @ ..] => {
tracing::warn!("ansi_escape_line: expected a single line, got {first:?} and {rest:?}");