fix(tui): replace hardcoded colors with Color::Reset for terminal compatibility (closes #666)
This commit is contained in:
@@ -196,6 +196,7 @@ alternate_screen = "auto" # auto | always | never
|
||||
mouse_capture = true # true copies only transcript user/assistant text; false uses raw terminal selection/copy
|
||||
terminal_probe_timeout_ms = 500 # optional startup terminal-mode timeout (100-5000ms)
|
||||
osc8_links = true # emit OSC 8 escapes around URLs (Cmd+click in iTerm2/Ghostty/Kitty/WezTerm/Terminal.app 13+); set false for terminals that misrender
|
||||
# use_terminal_colors = false # set true to let your terminal's color scheme take full control
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────────────
|
||||
# Feature Flags
|
||||
|
||||
@@ -343,6 +343,9 @@ pub struct TuiConfig {
|
||||
/// label and ignore the escape. Defaults to `true`; set `false` for
|
||||
/// terminals that misrender the sequence.
|
||||
pub osc8_links: Option<bool>,
|
||||
/// When true, TUI uses Color::Reset everywhere and defers all color decisions
|
||||
/// to the terminal emulator. Useful for terminals with custom color schemes.
|
||||
pub use_terminal_colors: Option<bool>,
|
||||
}
|
||||
|
||||
/// Notification delivery method (mirrors `tui::notifications::Method`).
|
||||
|
||||
@@ -385,7 +385,7 @@ impl ModalView for PagerView {
|
||||
Color::DarkGray
|
||||
};
|
||||
let fg = if is_current {
|
||||
Color::Black
|
||||
Color::Reset
|
||||
} else {
|
||||
Color::Yellow
|
||||
};
|
||||
|
||||
@@ -1363,7 +1363,7 @@ fn apply_detail_target_highlight(
|
||||
target_cell: usize,
|
||||
line_meta: &[TranscriptLineMeta],
|
||||
) {
|
||||
let highlight_bg = Color::Rgb(18, 29, 39);
|
||||
let highlight_bg = Color::Reset;
|
||||
for (idx, line) in lines.iter_mut().enumerate() {
|
||||
let line_index = top + idx;
|
||||
if let Some(TranscriptLineMeta::CellLine { cell_index, .. }) = line_meta.get(line_index)
|
||||
|
||||
Reference in New Issue
Block a user