Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Keep TUI Markdown colors readable against their backgrounds (#54315)

Felipe Coury86ee40c3801a
diff --git a/codex-rs/tui/src/history_cell/plans.rs b/codex-rs/tui/src/history_cell/plans.rs
index d8d55194fa..3d4ab4b49a 100644
--- a/codex-rs/tui/src/history_cell/plans.rs
+++ b/codex-rs/tui/src/history_cell/plans.rs
@@ -1,10 +1,38 @@
-//! Proposed-plan and plan-update history cells.
+//! Proposed-plan and plan-update history cells, including foreground contrast on the plan fill.
use super::markdown_render_cache::MarkdownRenderCache;
use super::*;
use crate::style::accent_color;
use crate::terminal_hyperlinks::lines_with_sources_eq;
+/// Apply the plan surface after Markdown layout, keeping retained reflow styles in sync.
+pub(crate) fn style_proposed_plan_line(
+ mut line: HyperlinkLine,
+ plan_style: Style,
+) -> HyperlinkLine {
+ if plan_style.bg.is_none() {
+ return line.style(plan_style);
+ }
+ let adapt = |mut style: Style, background| {
+ style.fg = style
+ .fg
+ .map(|foreground| crate::style::readable_color_on(foreground, style.bg.or(background)));
+ style
+ };
+ line.line.style = adapt(line.line.style.patch(plan_style), plan_style.bg);
+ for span in &mut line.line.spans {
+ span.style = adapt(span.style, line.line.style.bg);
+ }
+ if let Some(source) = &mut line.source {
+ source.line_style = adapt(source.line_style.patch(plan_style), plan_style.bg);
+ source.span_style = adapt(source.span_style, source.line_style.bg);
+ for (_, style) in std::sync::Arc::make_mut(&mut source.styles) {
+ *style = adapt(*style, source.span_style.bg.or(source.line_style.bg));
+ }
+ }
+ line
+}
+
/// Transient active-cell representation of the mutable tail of a proposed-plan stream.
///
/// The controller prepares the full styled plan lines because plan tails need the same header,
@@ -141,7 +169,11 @@ impl ProposedPlanCell {
plan_lines.extend(prefix_hyperlink_lines(body, " ".into(), " ".into()));
plan_lines.push(HyperlinkLine::new(Line::from(" ")));
- lines.extend(plan_lines.into_iter().map(|line| line.style(plan_style)));
+ lines.extend(
+ plan_lines
+ .into_iter()
+ .map(|line| style_proposed_plan_line(line, plan_style)),
+ );
lines
})
}
diff --git a/codex-rs/tui/src/history_cell/snapshots/codex_tui__history_cell__tests__proposed_plan_cell_renders_markdown_table.snap b/codex-rs/tui/src/history_cell/snapshots/codex_tui__history_cell__tests__proposed_plan_cell_renders_markdown_table.snap
new file mode 100644
index 0000000000..e47ef09605
--- /dev/null
+++ b/codex-rs/tui/src/history_cell/snapshots/codex_tui__history_cell__tests__proposed_plan_cell_renders_markdown_table.snap
@@ -0,0 +1,42 @@
+---
+source: tui/src/history_cell/tests.rs
+expression: lines
+---
+[
+ Line::from_iter([
+ Span::from("• ").dim(),
+ Span::from("Proposed Plan").bold(),
+ ]),
+ Line::from(" "),
+ Line::from(" ").bg(Color::Rgb(244, 244, 244)),
+ Line::from_iter([
+ Span::from(" "),
+ Span::from("## ").fg(Color::Rgb(191, 74, 7)).bold(),
+ Span::from("Plan").fg(Color::Rgb(191, 74, 7)).bold(),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ Line::from(" ").bg(Color::Rgb(244, 244, 244)),
+ Line::from_iter([
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("Step"),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("Owner"),
+ ]).fg(Color::Rgb(156, 99, 20)).bg(Color::Rgb(244, 244, 244)).bold(),
+ Line::from_iter([
+ Span::from(" "),
+ Span::from("━━━━━━━━ ━━━━━━━").dim(),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ Line::from_iter([
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("Verify"),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("Codex"),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ Line::from(" ").bg(Color::Rgb(244, 244, 244)),
+]
diff --git a/codex-rs/tui/src/history_cell/tests.rs b/codex-rs/tui/src/history_cell/tests.rs
index f3b62e10dd..1828bf7f37 100644
--- a/codex-rs/tui/src/history_cell/tests.rs
+++ b/codex-rs/tui/src/history_cell/tests.rs
@@ -356,28 +356,26 @@ fn source_backed_cells_render_raw_source_without_prefix_or_style() {
#[test]
fn proposed_plan_cell_renders_markdown_table() {
- let plan = new_proposed_plan(
- "## Plan\n\n| Step | Owner |\n| --- | --- |\n| Verify | Codex |\n".to_string(),
- &test_cwd(),
- );
+ crate::terminal_palette::with_test_default_colors(
+ crate::terminal_probe::DefaultColors {
+ fg: (30, 30, 30),
+ bg: (255, 255, 255),
+ },
+ || {
+ let plan = new_proposed_plan(
+ "## Plan\n\n| Step | Owner |\n| --- | --- |\n| Verify | Codex |\n".to_string(),
+ &test_cwd(),
+ );
- let rendered = render_lines(&plan.display_lines(/*width*/ 80));
+ let lines = plan.display_lines(/*width*/ 80);
+ insta::assert_debug_snapshot!(lines);
- assert!(
- rendered.iter().any(|line| line.contains('━')),
- "expected separated table in proposed plan output: {rendered:?}"
- );
- assert!(
- !rendered
- .iter()
- .any(|line| line.trim() == "| Step | Owner |"),
- "did not expect raw table header in rich proposed plan output: {rendered:?}"
- );
-
- let raw = render_lines(&plan.raw_lines());
- assert!(
- raw.iter().any(|line| line == "| Step | Owner |"),
- "expected raw mode to preserve table markdown source: {raw:?}"
+ let raw = render_lines(&plan.raw_lines());
+ assert!(
+ raw.iter().any(|line| line == "| Step | Owner |"),
+ "expected raw mode to preserve table markdown source: {raw:?}"
+ );
+ },
);
}
diff --git a/codex-rs/tui/src/inline_visualization_tests.rs b/codex-rs/tui/src/inline_visualization_tests.rs
index de7f18320f..75c9c5215f 100644
--- a/codex-rs/tui/src/inline_visualization_tests.rs
+++ b/codex-rs/tui/src/inline_visualization_tests.rs
@@ -346,8 +346,14 @@ fn finalized_agent_cell_replays_visualization_link() {
.expect("visualization URL span");
assert_eq!(
url_span.style,
- crate::render::highlight::foreground_style_for_scopes(&["markup.underline.link"])
- .unwrap()
+ Style::new()
+ .fg(crate::style::readable_color_on(
+ crate::render::highlight::foreground_style_for_scopes(&["markup.underline.link"])
+ .unwrap()
+ .fg
+ .unwrap(),
+ /*background*/ None,
+ ))
.underlined()
);
let destinations = lines
diff --git a/codex-rs/tui/src/markdown_render.rs b/codex-rs/tui/src/markdown_render.rs
index 7f09494c78..c770a3b541 100644
--- a/codex-rs/tui/src/markdown_render.rs
+++ b/codex-rs/tui/src/markdown_render.rs
@@ -136,7 +136,12 @@ impl Default for MarkdownStyles {
impl MarkdownStyles {
fn for_theme(theme: &syntect::highlighting::Theme) -> Self {
let foreground = |scopes: &[&str]| {
- foreground_style_for_scopes_with_theme(theme, scopes).unwrap_or_default()
+ let mut style =
+ foreground_style_for_scopes_with_theme(theme, scopes).unwrap_or_default();
+ style.fg = style.fg.map(|foreground| {
+ crate::style::readable_color_on(foreground, /*background*/ None)
+ });
+ style
};
Self {
h1: foreground(&["markup.heading.1.markdown", "markup.heading.markdown"])
@@ -2675,20 +2680,13 @@ mod tests {
let rendered =
render_markdown_lines_with_width_and_cwd(markdown, Some(22), /*cwd*/ None);
let source = rendered[0].source.as_ref().expect("blockquote source");
+ let styles = MarkdownStyles::default();
assert_eq!(
source.styled_range(0..source.text.len()),
Line::from(vec![
- Span::styled("block quote with ", MarkdownStyles::default().blockquote),
- Span::styled(
- "content",
- MarkdownStyles::default()
- .blockquote
- .patch(MarkdownStyles::default().strong)
- ),
- Span::styled(
- " that should wrap nicely",
- MarkdownStyles::default().blockquote
- ),
+ Span::styled("block quote with ", styles.blockquote),
+ Span::styled("content", styles.blockquote.patch(styles.strong)),
+ Span::styled(" that should wrap nicely", styles.blockquote),
])
);
let lines: Vec<_> = rendered.iter().map(|line| line.line.to_string()).collect();
diff --git a/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__bare_urls_are_styled_without_coloring_surrounding_prose.snap b/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__bare_urls_are_styled_without_coloring_surrounding_prose.snap
index ee1efc0847..d71d1d258c 100644
--- a/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__bare_urls_are_styled_without_coloring_surrounding_prose.snap
+++ b/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__bare_urls_are_styled_without_coloring_surrounding_prose.snap
@@ -1,6 +1,5 @@
---
source: tui/src/markdown_render/web_links_tests.rs
-assertion_line: 37
expression: text
---
-Text::from(Line::from_iter([Span::from("界 ("), Span::from("https://example.com/a").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from("); "), Span::from("https://example.com/b").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from("! "), Span::from("https://example.com/c").fg(Color::Rgb(137, 180, 250)).bold().underlined()]))
+Text::from(Line::from_iter([Span::from("界 ("), Span::from("https://example.com/a").fg(Color::Reset).underlined(), Span::from("); "), Span::from("https://example.com/b").fg(Color::Reset).underlined(), Span::from("! "), Span::from("https://example.com/c").fg(Color::Reset).bold().underlined()]))
diff --git a/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__bare_urls_keep_link_style_when_wrapped_in_tables.snap b/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__bare_urls_keep_link_style_when_wrapped_in_tables.snap
index 911cf60682..0b1a213121 100644
--- a/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__bare_urls_keep_link_style_when_wrapped_in_tables.snap
+++ b/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__bare_urls_keep_link_style_when_wrapped_in_tables.snap
@@ -1,6 +1,5 @@
---
source: tui/src/markdown_render/web_links_tests.rs
-assertion_line: 63
expression: text
---
Text::from_iter([
@@ -11,10 +10,10 @@ Text::from_iter([
Line::from(Span::from("━━━━━━━━━━━━━━━━━━━━").dim()),
Line::from_iter([
Span::from(" "),
- Span::from("https://").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("https://").fg(Color::Reset).underlined(),
]),
Line::from_iter([
Span::from(" "),
- Span::from("example.com/docs").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("example.com/docs").fg(Color::Reset).underlined(),
]),
])
diff --git a/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__label_only_and_fallback_presentations_snapshot.snap b/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__label_only_and_fallback_presentations_snapshot.snap
index 6dd37933fa..2c6a1bce21 100644
--- a/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__label_only_and_fallback_presentations_snapshot.snap
+++ b/codex-rs/tui/src/markdown_render/snapshots/codex_tui__markdown_render__web_links__tests__label_only_and_fallback_presentations_snapshot.snap
@@ -6,11 +6,11 @@ expression: presentations
Text::from_iter([
Line::from_iter([
Span::from("plain "),
- Span::from("plain").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("plain").fg(Color::Reset).underlined(),
Span::from(" "),
Span::from("code").fg(Color::Rgb(166, 227, 161)),
Span::from(" "),
- Span::from("code").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("code").fg(Color::Reset).underlined(),
]),
Line::default(),
Line::from_iter([
@@ -20,23 +20,23 @@ expression: presentations
Line::from(Span::from("━━━━━━━━━━").dim()),
Line::from_iter([
Span::from(" "),
- Span::from("docs").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("docs").fg(Color::Reset).underlined(),
]),
]),
Text::from_iter([
Line::from_iter([
Span::from("plain "),
- Span::from("plain").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("plain").fg(Color::Reset).underlined(),
Span::from(" ("),
- Span::from("https://example.com").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("https://example.com").fg(Color::Reset).underlined(),
Span::from(")"),
Span::from(" "),
Span::from("code").fg(Color::Rgb(166, 227, 161)),
]),
Line::from_iter([
- Span::from("code").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("code").fg(Color::Reset).underlined(),
Span::from(" ("),
- Span::from("https://example.com").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("https://example.com").fg(Color::Reset).underlined(),
Span::from(")"),
]),
Line::default(),
@@ -47,9 +47,9 @@ expression: presentations
Line::from(Span::from("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━").dim()),
Line::from_iter([
Span::from(" "),
- Span::from("docs").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("docs").fg(Color::Reset).underlined(),
Span::from(" ("),
- Span::from("https://example.com/docs").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from("https://example.com/docs").fg(Color::Reset).underlined(),
Span::from(")"),
]),
]),
diff --git a/codex-rs/tui/src/markdown_render_tests.rs b/codex-rs/tui/src/markdown_render_tests.rs
index 3230dd8e36..36a839d4b2 100644
--- a/codex-rs/tui/src/markdown_render_tests.rs
+++ b/codex-rs/tui/src/markdown_render_tests.rs
@@ -755,13 +755,15 @@ fn inline_code() {
#[test]
fn inline_code_and_file_paths_follow_syntax_theme() {
- let markdown = "Use `src/main.rs` and [](./src/lib.rs).";
+ let markdown = "# Heading\n\n**Bold** *Italic* [Link](https://example.com)\n\n> Quote\n\n1. Ordered\n\n- Unordered\n\nUse `src/main.rs` and [](./src/lib.rs).";
let mut rendered = Vec::new();
- for name in [
- "catppuccin-mocha",
- "catppuccin-latte",
- "ansi",
- "no-markup-color",
+ for (name, background) in [
+ ("catppuccin-mocha", "dark"),
+ ("catppuccin-mocha", "light"),
+ ("catppuccin-latte", "light"),
+ ("nord", "dark"),
+ ("ansi", "dark"),
+ ("no-markup-color", "dark"),
] {
let theme = if name == "no-markup-color" {
syntect::highlighting::Theme::default()
@@ -769,7 +771,7 @@ fn inline_code_and_file_paths_follow_syntax_theme() {
crate::render::highlight::resolve_theme_by_name(name, /*codex_home*/ None)
.expect("bundled theme")
};
- let colors = if name == "catppuccin-latte" {
+ let colors = if background == "light" {
crate::terminal_probe::DefaultColors {
fg: (30, 30, 30),
bg: (255, 255, 255),
@@ -810,7 +812,7 @@ fn inline_code_and_file_paths_follow_syntax_theme() {
if name == "no-markup-color" {
assert_eq!(code_style, ratatui::style::Style::new().fg(accent_color()));
} else {
- rendered.push((name, lines));
+ rendered.push((name, background, lines));
}
});
}
diff --git a/codex-rs/tui/src/markdown_stream.rs b/codex-rs/tui/src/markdown_stream.rs
index d2bcf53ce5..9b03f1438f 100644
--- a/codex-rs/tui/src/markdown_stream.rs
+++ b/codex-rs/tui/src/markdown_stream.rs
@@ -226,6 +226,7 @@ pub(crate) fn simulate_stream_markdown_for_tests(
mod tests {
use super::*;
use crate::render::highlight::foreground_style_for_scopes;
+ use pretty_assertions::assert_eq;
use ratatui::style::Color;
#[tokio::test]
@@ -254,7 +255,10 @@ mod tests {
let l = &out[0];
assert_eq!(
l.style.fg,
- foreground_style_for_scopes(&["markup.quote"]).unwrap().fg,
+ foreground_style_for_scopes(&["markup.quote"])
+ .unwrap()
+ .fg
+ .map(|color| crate::style::readable_color_on(color, /*background*/ None)),
"expected themed blockquote foreground, got {:?}",
l.style.fg
);
@@ -270,25 +274,20 @@ mod tests {
let non_blank: Vec<_> = out
.into_iter()
.filter(|l| {
- let s = l
- .spans
- .iter()
- .map(|sp| sp.content.clone())
- .collect::<Vec<_>>()
- .join("");
+ let s = l.to_string();
let t = s.trim();
// Ignore quote-only blank lines like ">" inserted at paragraph boundaries.
!(t.is_empty() || t == ">")
})
.collect();
assert_eq!(non_blank.len(), 2);
+ let expected_color = foreground_style_for_scopes(&["markup.quote"])
+ .unwrap()
+ .fg
+ .map(|color| crate::style::readable_color_on(color, /*background*/ None));
assert_eq!(
- non_blank[0].style.fg,
- foreground_style_for_scopes(&["markup.quote"]).unwrap().fg
- );
- assert_eq!(
- non_blank[1].style.fg,
- foreground_style_for_scopes(&["markup.quote"]).unwrap().fg
+ [non_blank[0].style.fg, non_blank[1].style.fg],
+ [expected_color; 2]
);
}
@@ -299,14 +298,11 @@ mod tests {
/*finalize*/ true,
);
assert_eq!(out.len(), 2);
- assert_eq!(
- out[0].style.fg,
- foreground_style_for_scopes(&["markup.quote"]).unwrap().fg
- );
- assert_eq!(
- out[1].style.fg,
- foreground_style_for_scopes(&["markup.quote"]).unwrap().fg
- );
+ let expected_color = foreground_style_for_scopes(&["markup.quote"])
+ .unwrap()
+ .fg
+ .map(|color| crate::style::readable_color_on(color, /*background*/ None));
+ assert_eq!([out[0].style.fg, out[1].style.fg], [expected_color; 2]);
}
#[tokio::test]
@@ -352,27 +348,20 @@ mod tests {
// Filter out purely blank lines
let non_blank: Vec<_> = wrapped
.into_iter()
- .filter(|l| {
- let s = l
- .spans
- .iter()
- .map(|sp| sp.content.clone())
- .collect::<Vec<_>>()
- .join("");
- !s.trim().is_empty()
- })
+ .filter(|l| !l.to_string().trim().is_empty())
.collect();
assert!(
non_blank.len() >= 2,
"expected wrapped blockquote to span multiple lines"
);
+ let expected_color = foreground_style_for_scopes(&["markup.quote"])
+ .unwrap()
+ .fg
+ .map(|color| crate::style::readable_color_on(color, /*background*/ None));
for (i, l) in non_blank.iter().enumerate() {
assert_eq!(
- l.spans[0].style.fg,
- foreground_style_for_scopes(&["markup.quote"]).unwrap().fg,
- "wrapped line {} should preserve green style, got {:?}",
- i,
- l.spans[0].style.fg
+ l.spans[0].style.fg, expected_color,
+ "wrapped line {i} should preserve the adapted quote style"
);
}
}
diff --git a/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__inline_code_and_file_paths_follow_syntax_theme.snap b/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__inline_code_and_file_paths_follow_syntax_theme.snap
index ba3a99050c..9c6fcf778d 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__inline_code_and_file_paths_follow_syntax_theme.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__inline_code_and_file_paths_follow_syntax_theme.snap
@@ -5,7 +5,90 @@ expression: rendered
[
(
"catppuccin-mocha",
+ "dark",
[
+ Line::from_iter([
+ Span::from("# ").fg(Color::Rgb(243, 139, 168)).bold().underlined(),
+ Span::from("Heading").fg(Color::Rgb(243, 139, 168)).bold().underlined(),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("Bold").fg(Color::Rgb(243, 139, 168)).bold(),
+ Span::from(" "),
+ Span::from("Italic").fg(Color::Rgb(243, 139, 168)).italic(),
+ Span::from(" "),
+ Span::from("Link").fg(Color::Rgb(137, 180, 250)).underlined(),
+ ]),
+ Line::from_iter([
+ Span::from("("),
+ Span::from("https://example.com").fg(Color::Rgb(137, 180, 250)).underlined(),
+ Span::from(")"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("> "),
+ Span::from("Quote"),
+ ]).fg(Color::Rgb(245, 194, 231)),
+ Line::default(),
+ Line::from_iter([
+ Span::from("1. ").light_blue(),
+ Span::from("Ordered"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("• ").fg(Color::Rgb(148, 226, 213)),
+ Span::from("Unordered"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("Use "),
+ Span::from("src/main.rs").fg(Color::Rgb(166, 227, 161)),
+ Span::from(" and "),
+ Span::from("./").fg(Color::Rgb(166, 227, 161)),
+ ]),
+ Line::from_iter([
+ Span::from("src/lib.rs").fg(Color::Rgb(166, 227, 161)),
+ Span::from("."),
+ ]),
+ ],
+ ),
+ (
+ "catppuccin-mocha",
+ "light",
+ [
+ Line::from_iter([
+ Span::from("# ").fg(Color::Rgb(169, 97, 117)).bold().underlined(),
+ Span::from("Heading").fg(Color::Rgb(169, 97, 117)).bold().underlined(),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("Bold").fg(Color::Rgb(169, 97, 117)).bold(),
+ Span::from(" "),
+ Span::from("Italic").fg(Color::Rgb(169, 97, 117)).italic(),
+ Span::from(" "),
+ Span::from("Link").fg(Color::Rgb(91, 119, 166)).underlined(),
+ ]),
+ Line::from_iter([
+ Span::from("("),
+ Span::from("https://example.com").fg(Color::Rgb(91, 119, 166)).underlined(),
+ Span::from(")"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("> "),
+ Span::from("Quote"),
+ ]).fg(Color::Rgb(139, 110, 131)),
+ Line::default(),
+ Line::from_iter([
+ Span::from("1. ").light_blue(),
+ Span::from("Ordered"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("• ").fg(Color::Rgb(82, 126, 119)),
+ Span::from("Unordered"),
+ ]),
+ Line::default(),
Line::from_iter([
Span::from("Use "),
Span::from("src/main.rs").fg(Color::Rgb(166, 227, 161)),
@@ -20,7 +103,41 @@ expression: rendered
),
(
"catppuccin-latte",
+ "light",
[
+ Line::from_iter([
+ Span::from("# ").fg(Color::Rgb(210, 15, 57)).bold().underlined(),
+ Span::from("Heading").fg(Color::Rgb(210, 15, 57)).bold().underlined(),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("Bold").fg(Color::Rgb(210, 15, 57)).bold(),
+ Span::from(" "),
+ Span::from("Italic").fg(Color::Rgb(210, 15, 57)).italic(),
+ Span::from(" "),
+ Span::from("Link").fg(Color::Rgb(30, 102, 245)).underlined(),
+ ]),
+ Line::from_iter([
+ Span::from("("),
+ Span::from("https://example.com").fg(Color::Rgb(30, 102, 245)).underlined(),
+ Span::from(")"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("> "),
+ Span::from("Quote"),
+ ]).fg(Color::Rgb(174, 87, 151)),
+ Line::default(),
+ Line::from_iter([
+ Span::from("1. ").light_blue(),
+ Span::from("Ordered"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("• ").fg(Color::Rgb(20, 131, 138)),
+ Span::from("Unordered"),
+ ]),
+ Line::default(),
Line::from_iter([
Span::from("Use "),
Span::from("src/main.rs").fg(Color::Rgb(64, 160, 43)),
@@ -33,9 +150,92 @@ expression: rendered
]),
],
),
+ (
+ "nord",
+ "dark",
+ [
+ Line::from_iter([
+ Span::from("# ").fg(Color::Rgb(136, 192, 208)).bold().underlined(),
+ Span::from("Heading").fg(Color::Rgb(136, 192, 208)).bold().underlined(),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("Bold").bold(),
+ Span::from(" "),
+ Span::from("Italic").italic(),
+ Span::from(" "),
+ Span::from("Link").fg(Color::Rgb(99, 168, 248)).underlined(),
+ ]),
+ Line::from_iter([
+ Span::from("("),
+ Span::from("https://example.com").fg(Color::Rgb(99, 168, 248)).underlined(),
+ Span::from(")"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("> "),
+ Span::from("Quote"),
+ ]).fg(Color::Rgb(114, 126, 149)),
+ Line::default(),
+ Line::from_iter([
+ Span::from("1. ").fg(Color::Rgb(216, 222, 233)),
+ Span::from("Ordered"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("• ").fg(Color::Rgb(216, 222, 233)),
+ Span::from("Unordered"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("Use "),
+ Span::from("src/main.rs").fg(Color::Rgb(143, 188, 187)),
+ Span::from(" and "),
+ Span::from("./").fg(Color::Rgb(143, 188, 187)),
+ ]),
+ Line::from_iter([
+ Span::from("src/lib.rs").fg(Color::Rgb(143, 188, 187)),
+ Span::from("."),
+ ]),
+ ],
+ ),
(
"ansi",
+ "dark",
[
+ Line::from_iter([
+ Span::from("# ").blue().bold().underlined(),
+ Span::from("Heading").blue().bold().underlined(),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("Bold").yellow().bold(),
+ Span::from(" "),
+ Span::from("Italic").magenta().italic(),
+ Span::from(" "),
+ Span::from("Link").fg(Color::Rgb(99, 168, 248)).underlined(),
+ ]),
+ Line::from_iter([
+ Span::from("("),
+ Span::from("https://example.com").fg(Color::Rgb(99, 168, 248)).underlined(),
+ Span::from(")"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("> "),
+ Span::from("Quote"),
+ ]).yellow(),
+ Line::default(),
+ Line::from_iter([
+ Span::from("1. ").light_blue(),
+ Span::from("Ordered"),
+ ]),
+ Line::default(),
+ Line::from_iter([
+ Span::from("• "),
+ Span::from("Unordered"),
+ ]),
+ Line::default(),
Line::from_iter([
Span::from("Use "),
Span::from("src/main.rs").green(),
diff --git a/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__ordered_list_markers_use_terminal_palette_snapshot.snap b/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__ordered_list_markers_use_terminal_palette_snapshot.snap
index 9635df8b75..d2881139a9 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__ordered_list_markers_use_terminal_palette_snapshot.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__ordered_list_markers_use_terminal_palette_snapshot.snap
@@ -1,6 +1,5 @@
---
source: tui/src/markdown_render_tests.rs
-assertion_line: 608
expression: text
---
-Text::from(Line::from_iter([Span::from("1. ").light_blue(), Span::from("plain "), Span::from("plain").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from(" ("), Span::from("https://example.com").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from(")"), Span::from(" "), Span::from("code").fg(Color::Rgb(166, 227, 161)), Span::from(" "), Span::from("code").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from(" ("), Span::from("https://example.com").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from(")")]))
+Text::from(Line::from_iter([Span::from("1. ").light_blue(), Span::from("plain "), Span::from("plain").fg(Color::Reset).underlined(), Span::from(" ("), Span::from("https://example.com").fg(Color::Reset).underlined(), Span::from(")"), Span::from(" "), Span::from("code").fg(Color::Rgb(166, 227, 161)), Span::from(" "), Span::from("code").fg(Color::Reset).underlined(), Span::from(" ("), Span::from("https://example.com").fg(Color::Reset).underlined(), Span::from(")")]))
diff --git a/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__web_link_labels_have_a_visible_underline_snapshot.snap b/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__web_link_labels_have_a_visible_underline_snapshot.snap
index a385a8c188..a0e0732aee 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__web_link_labels_have_a_visible_underline_snapshot.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__markdown_render__markdown_render_tests__web_link_labels_have_a_visible_underline_snapshot.snap
@@ -2,4 +2,4 @@
source: tui/src/markdown_render_tests.rs
expression: text
---
-Text::from(Line::from_iter([Span::from("plain "), Span::from("plain").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from(" ("), Span::from("https://example.com").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from(")"), Span::from(" "), Span::from("code").fg(Color::Rgb(166, 227, 161)), Span::from(" "), Span::from("code").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from(" ("), Span::from("https://example.com").fg(Color::Rgb(137, 180, 250)).underlined(), Span::from(")")]))
+Text::from(Line::from_iter([Span::from("plain "), Span::from("plain").fg(Color::Reset).underlined(), Span::from(" ("), Span::from("https://example.com").fg(Color::Reset).underlined(), Span::from(")"), Span::from(" "), Span::from("code").fg(Color::Rgb(166, 227, 161)), Span::from(" "), Span::from("code").fg(Color::Reset).underlined(), Span::from(" ("), Span::from("https://example.com").fg(Color::Reset).underlined(), Span::from(")")]))
diff --git a/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_linux.snap b/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_linux.snap
index 77283c5ec8..506513a581 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_linux.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_linux.snap
@@ -2,7 +2,7 @@
source: tui/src/tooltips.rs
expression: rendered
---
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Use the "), Span::from("desktop app").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(". Install it")]) []
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Use the "), Span::from("desktop app").fg(Color::Reset).bold(), Span::from(". Install it")]) []
Line::from("from") []
-Line::from(Span::from("https://learn.chatgpt.com/docs/linux/linux-app").fg(Color::Rgb(137, 180, 250)).underlined()) [TerminalHyperlink { columns: 0..46, destination: "https://learn.chatgpt.com/docs/linux/linux-app", destination_kind: Web }]
+Line::from(Span::from("https://learn.chatgpt.com/docs/linux/linux-app").fg(Color::Reset).underlined()) [TerminalHyperlink { columns: 0..46, destination: "https://learn.chatgpt.com/docs/linux/linux-app", destination_kind: Web }]
Line::from_iter([Span::from("and run "), Span::from("chatgpt").fg(Color::Rgb(166, 227, 161)), Span::from(".")]) []
diff --git a/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_macos.snap b/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_macos.snap
index f5e13b5c2f..401dbfeaf2 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_macos.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_macos.snap
@@ -2,6 +2,6 @@
source: tui/src/tooltips.rs
expression: rendered
---
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Use the "), Span::from("desktop app").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(". Run "), Span::from("codex app").fg(Color::Rgb(166, 227, 161))]) []
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Use the "), Span::from("desktop app").fg(Color::Reset).bold(), Span::from(". Run "), Span::from("codex app").fg(Color::Rgb(166, 227, 161))]) []
Line::from("to open it. It installs automatically if") []
Line::from("needed.") []
diff --git a/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_windows.snap b/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_windows.snap
index 629d1bc236..5bd73ec2a7 100644
--- a/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_windows.snap
+++ b/codex-rs/tui/src/snapshots/codex_tui__tooltips__tests__desktop_app_tip_windows.snap
@@ -2,7 +2,7 @@
source: tui/src/tooltips.rs
expression: rendered
---
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Use the "), Span::from("desktop app").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(". Install it")]) []
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Use the "), Span::from("desktop app").fg(Color::Reset).bold(), Span::from(". Install it")]) []
Line::from("from") []
-Line::from(Span::from("https://chatgpt.com/codex?app-landing-page=true").fg(Color::Rgb(137, 180, 250)).underlined()) [TerminalHyperlink { columns: 0..47, destination: "https://chatgpt.com/codex?app-landing-page=true", destination_kind: Web }]
+Line::from(Span::from("https://chatgpt.com/codex?app-landing-page=true").fg(Color::Reset).underlined()) [TerminalHyperlink { columns: 0..47, destination: "https://chatgpt.com/codex?app-landing-page=true", destination_kind: Web }]
Line::from_iter([Span::from("and run "), Span::from("codex app").fg(Color::Rgb(166, 227, 161)), Span::from(".")]) []
diff --git a/codex-rs/tui/src/streaming/controller.rs b/codex-rs/tui/src/streaming/controller.rs
index 50d9326910..8937b4c096 100644
--- a/codex-rs/tui/src/streaming/controller.rs
+++ b/codex-rs/tui/src/streaming/controller.rs
@@ -898,7 +898,7 @@ impl PlanStreamController {
let plan_style = proposed_plan_style();
let plan_lines = prefix_hyperlink_lines(plan_lines, " ".into(), " ".into())
.into_iter()
- .map(|line| line.style(plan_style))
+ .map(|line| history_cell::style_proposed_plan_line(line, plan_style))
.collect::<Vec<_>>();
out_lines.extend(plan_lines);
out_lines
@@ -1952,30 +1952,41 @@ mod tests {
#[test]
fn finalized_plan_stream_preserves_semantic_url_fragments() {
- let destination = "https://example.com/a/very/long/path/to/a/table/artifact";
- let source = format!("| Step | URL |\n| --- | --- |\n| Verify | {destination} |\n");
- let mut ctrl = PlanStreamController::new(
- /*width*/ Some(32),
- &test_cwd(),
- HistoryRenderMode::Rich,
- );
- ctrl.push(&source);
-
- let (cell, _) = ctrl.finalize();
- let lines = cell
- .expect("final plan stream table cell")
- .display_hyperlink_lines(/*width*/ 32);
- let linked_rows = lines
- .iter()
- .filter(|line| !line.hyperlinks.is_empty())
- .collect::<Vec<_>>();
+ crate::terminal_palette::with_test_default_colors(
+ crate::terminal_probe::DefaultColors {
+ fg: (30, 30, 30),
+ bg: (255, 255, 255),
+ },
+ || {
+ let destination = "https://example.com/a/very/long/path/to/a/table/artifact";
+ let source = format!(
+ "# Plan\n\n> Quote\n\n| Step | URL |\n| --- | --- |\n| Verify | {destination} |\n"
+ );
+ let mut ctrl = PlanStreamController::new(
+ /*width*/ Some(32),
+ &test_cwd(),
+ HistoryRenderMode::Rich,
+ );
+ ctrl.push(&source);
+
+ let (cell, _) = ctrl.finalize();
+ let lines = cell
+ .expect("final plan stream table cell")
+ .display_hyperlink_lines(/*width*/ 32);
+ insta::assert_debug_snapshot!(lines);
+ let linked_rows = lines
+ .iter()
+ .filter(|line| !line.hyperlinks.is_empty())
+ .collect::<Vec<_>>();
- assert!(linked_rows.len() > 1);
- assert!(linked_rows.iter().all(|line| {
- line.hyperlinks
- .iter()
- .all(|link| link.destination == destination)
- }));
+ assert!(linked_rows.len() > 1);
+ assert!(linked_rows.iter().all(|line| {
+ line.hyperlinks
+ .iter()
+ .all(|link| link.destination == destination)
+ }));
+ },
+ );
}
#[test]
diff --git a/codex-rs/tui/src/streaming/snapshots/codex_tui__streaming__controller__tests__finalized_plan_stream_preserves_semantic_url_fragments.snap b/codex-rs/tui/src/streaming/snapshots/codex_tui__streaming__controller__tests__finalized_plan_stream_preserves_semantic_url_fragments.snap
new file mode 100644
index 0000000000..41c738f86f
--- /dev/null
+++ b/codex-rs/tui/src/streaming/snapshots/codex_tui__streaming__controller__tests__finalized_plan_stream_preserves_semantic_url_fragments.snap
@@ -0,0 +1,129 @@
+---
+source: tui/src/streaming/controller.rs
+expression: lines
+---
+[
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from("• ").dim(),
+ Span::from("Proposed Plan").bold(),
+ ]),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from(" "),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from(" "),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from("# ").fg(Color::Rgb(210, 15, 57)).bold().underlined(),
+ Span::from("Plan").fg(Color::Rgb(210, 15, 57)).bold().underlined(),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from(" ").bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from("> "),
+ Span::from("Quote"),
+ ]).fg(Color::Rgb(165, 82, 143)).bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from(" ").bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("Step"),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("URL"),
+ ]).fg(Color::Rgb(156, 99, 20)).bg(Color::Rgb(244, 244, 244)).bold(),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from("━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━").dim(),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("Verify"),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("https://example.com/").fg(Color::Rgb(29, 101, 244)).underlined(),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [
+ TerminalHyperlink {
+ columns: 13..33,
+ destination: "https://example.com/a/very/long/path/to/a/table/artifact",
+ destination_kind: Web,
+ },
+ ],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("a/very/long/path/to/").fg(Color::Rgb(29, 101, 244)).underlined(),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [
+ TerminalHyperlink {
+ columns: 13..33,
+ destination: "https://example.com/a/very/long/path/to/a/table/artifact",
+ destination_kind: Web,
+ },
+ ],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from(" "),
+ Span::from("a/table/artifact").fg(Color::Rgb(29, 101, 244)).underlined(),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [
+ TerminalHyperlink {
+ columns: 13..29,
+ destination: "https://example.com/a/very/long/path/to/a/table/artifact",
+ destination_kind: Web,
+ },
+ ],
+ },
+ HyperlinkLine {
+ line: Line::from_iter([
+ Span::from(" "),
+ Span::from(" "),
+ ]).bg(Color::Rgb(244, 244, 244)),
+ hyperlinks: [],
+ },
+]
diff --git a/codex-rs/tui/src/streaming/snapshots/codex_tui__streaming__render__tests__inline_visualizations_without_context_use_canonical_full_render.snap b/codex-rs/tui/src/streaming/snapshots/codex_tui__streaming__render__tests__inline_visualizations_without_context_use_canonical_full_render.snap
index b719e64ee7..02dbd77a8f 100644
--- a/codex-rs/tui/src/streaming/snapshots/codex_tui__streaming__render__tests__inline_visualizations_without_context_use_canonical_full_render.snap
+++ b/codex-rs/tui/src/streaming/snapshots/codex_tui__streaming__render__tests__inline_visualizations_without_context_use_canonical_full_render.snap
@@ -12,7 +12,7 @@ expression: render.lines
hyperlinks: [],
},
HyperlinkLine {
- line: Line::from(Span::from("Visualization unavailable on this device.").fg(Color::Rgb(243, 139, 168)).italic()),
+ line: Line::from(Span::from("Visualization unavailable on this device.").fg(Color::Reset).italic()),
hyperlinks: [],
},
]
diff --git a/codex-rs/tui/src/tooltips/snapshots/codex_tui__tooltips__keybinding_tests__configured_shortcut_tips_render_at_narrow_width.snap b/codex-rs/tui/src/tooltips/snapshots/codex_tui__tooltips__keybinding_tests__configured_shortcut_tips_render_at_narrow_width.snap
index 3862c8feef..467be5f32f 100644
--- a/codex-rs/tui/src/tooltips/snapshots/codex_tui__tooltips__keybinding_tests__configured_shortcut_tips_render_at_narrow_width.snap
+++ b/codex-rs/tui/src/tooltips/snapshots/codex_tui__tooltips__keybinding_tests__configured_shortcut_tips_render_at_narrow_width.snap
@@ -3,50 +3,50 @@ source: tui/src/tooltips/keybinding_tests.rs
expression: "lines.iter().map(|line| format!(\"{line:?}\")).collect::<Vec<_>>().join(\"\\n\")"
---
Line::from("Default")
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("tab").fg(Color::Rgb(166, 227, 161)), Span::from(" to queue a message when a")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("tab").fg(Color::Rgb(166, 227, 161)), Span::from(" to queue a message when a")])
Line::from("task is running; otherwise it sends")
Line::from_iter([Span::from("immediately (except "), Span::from("!").fg(Color::Rgb(166, 227, 161)), Span::from(").")])
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Use "), Span::from("/copy").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" or press "), Span::from("⌃o").fg(Color::Rgb(166, 227, 161)), Span::from(" to copy the")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Use "), Span::from("/copy").fg(Color::Reset).bold(), Span::from(" or press "), Span::from("⌃o").fg(Color::Rgb(166, 227, 161)), Span::from(" to copy the")])
Line::from("latest agent response as Markdown.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("⌃t").fg(Color::Rgb(166, 227, 161)), Span::from(" to open the full")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("⌃t").fg(Color::Rgb(166, 227, 161)), Span::from(" to open the full")])
Line::from("transcript.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("f3").fg(Color::Rgb(166, 227, 161)), Span::from(" to search this")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("f3").fg(Color::Rgb(166, 227, 161)), Span::from(" to search this")])
Line::from("conversation.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("⌃g").fg(Color::Rgb(166, 227, 161)), Span::from(" to edit your current draft")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("⌃g").fg(Color::Rgb(166, 227, 161)), Span::from(" to edit your current draft")])
Line::from("in an external editor.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("⌃r").fg(Color::Rgb(166, 227, 161)), Span::from(" to search previously")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("⌃r").fg(Color::Rgb(166, 227, 161)), Span::from(" to search previously")])
Line::from("entered prompts.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" For models with adjustable")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" For models with adjustable")])
Line::from_iter([Span::from("reasoning, press "), Span::from("⌥.").fg(Color::Rgb(166, 227, 161)), Span::from(" to increase")])
Line::from_iter([Span::from("reasoning effort or "), Span::from("⌥,").fg(Color::Rgb(166, 227, 161)), Span::from(" to decrease it.")])
Line::default()
Line::from("Remapped")
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("⌃x q").fg(Color::Rgb(166, 227, 161)), Span::from(" to queue a message when")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("⌃x q").fg(Color::Rgb(166, 227, 161)), Span::from(" to queue a message when")])
Line::from("a task is running; otherwise it sends")
Line::from_iter([Span::from("immediately (except "), Span::from("!").fg(Color::Rgb(166, 227, 161)), Span::from(").")])
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Use "), Span::from("/copy").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" or press "), Span::from("⌃x `").fg(Color::Rgb(166, 227, 161)), Span::from(" to copy the")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Use "), Span::from("/copy").fg(Color::Reset).bold(), Span::from(" or press "), Span::from("⌃x `").fg(Color::Rgb(166, 227, 161)), Span::from(" to copy the")])
Line::from("latest agent response as Markdown.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("⌃x t").fg(Color::Rgb(166, 227, 161)), Span::from(" to open the full")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("⌃x t").fg(Color::Rgb(166, 227, 161)), Span::from(" to open the full")])
Line::from("transcript.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("⌃x f").fg(Color::Rgb(166, 227, 161)), Span::from(" to search this")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("⌃x f").fg(Color::Rgb(166, 227, 161)), Span::from(" to search this")])
Line::from("conversation.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("⌃x e").fg(Color::Rgb(166, 227, 161)), Span::from(" to edit your current")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("⌃x e").fg(Color::Rgb(166, 227, 161)), Span::from(" to edit your current")])
Line::from("draft in an external editor.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" Press "), Span::from("⌃x r").fg(Color::Rgb(166, 227, 161)), Span::from(" to search previously")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" Press "), Span::from("⌃x r").fg(Color::Rgb(166, 227, 161)), Span::from(" to search previously")])
Line::from("entered prompts.")
Line::default()
-Line::from_iter([Span::from("Tip:").fg(Color::Rgb(243, 139, 168)).bold(), Span::from(" For models with adjustable")])
+Line::from_iter([Span::from("Tip:").fg(Color::Reset).bold(), Span::from(" For models with adjustable")])
Line::from_iter([Span::from("reasoning, press "), Span::from("⌃x +").fg(Color::Rgb(166, 227, 161)), Span::from(" to increase")])
Line::from_iter([Span::from("reasoning effort or "), Span::from("⌃x -").fg(Color::Rgb(166, 227, 161)), Span::from(" to decrease it.")])
Line::default()