mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +00:00
Centralize TUI terminal capability decisions (#63790)
## Why Terminal-specific checks are spread across rendering and scrollback code. Independent capability queries let callers share those checks without starting unrelated terminal probes or caching live settings together. ## What changed Move scrollback strategy, title encoding, and Markdown link display decisions into `terminal_capabilities`. Route color detection and resize reflow limits through the same module. Rendering and scrollback code apply the selected modes. GitOrigin-RevId: 6803e4b50ff5d3517efb5c07474d9ce17690e12d
This commit is contained in:
@@ -213,7 +213,7 @@ fn resolve_diff_backgrounds(
|
||||
/// mid-render (theme picker live preview).
|
||||
pub(crate) fn current_diff_render_style_context() -> DiffRenderStyleContext {
|
||||
let theme = diff_theme();
|
||||
let color_level = match codex_terminal_detection::terminal_color_level() {
|
||||
let color_level = match crate::terminal_capabilities::terminal_color_level() {
|
||||
StdoutColorLevel::TrueColor => DiffColorLevel::TrueColor,
|
||||
StdoutColorLevel::Ansi256 => DiffColorLevel::Ansi256,
|
||||
StdoutColorLevel::Ansi16 | StdoutColorLevel::Unknown => DiffColorLevel::Ansi16,
|
||||
|
||||
Reference in New Issue
Block a user