mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
## Why SSH can forward Ghostty's `TERM=xterm-ghostty` without `COLORTERM`, leaving Codex to use an ANSI-16 palette for a truecolor terminal. ## What changed Centralize stdout color detection in `codex-terminal-detection`. Upgrade an ANSI-16 result to truecolor when `TERM` is `xterm-ghostty` and neither `FORCE_COLOR` nor an active `CLICOLOR_FORCE` override is present. Use the shared detection for TUI colors, including shimmer and activity indicators. Share the existing Windows Terminal palette rules between diff rendering and theme colors. ## Testing Cover Ghostty's `TERM` fallback, explicit color overrides, and Windows Terminal palette detection in unit tests. Exercise theme preview, selection, and restoration with Ghostty's `TERM` and no `COLORTERM`. GitOrigin-RevId: e7b6832fc7e721d5e2c23ef19df5fe55fbfeb21a
21 lines
368 B
TOML
21 lines
368 B
TOML
[package]
|
|
name = "codex-terminal-detection"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lib]
|
|
name = "codex_terminal_detection"
|
|
path = "src/lib.rs"
|
|
doctest = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
supports-color = { workspace = true }
|
|
tracing = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions = { workspace = true }
|