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:
Eric Traut
2026-11-25 01:14:25 +00:00
committed by copyberry
parent 6e32b34f27
commit ebb1ff0e8b
13 changed files with 136 additions and 115 deletions
@@ -7,7 +7,7 @@ use super::AppServerSession;
use crate::history_cell::HistoryRenderMode;
use crate::legacy_core::config::Config;
use crate::local_settings::LocalSettings;
use crate::resize_reflow_cap::resize_reflow_max_rows;
use crate::terminal_capabilities::resize_reflow_max_rows;
use crate::thread_transcript::RawReasoningVisibility;
use crate::thread_transcript::thread_items_to_transcript_cells;
use codex_app_server_protocol::ClientRequest;