Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions codex-rs/tui/src/terminal_palette.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ mod imp {
return Ok(None);
}

// Many modern GPU terminals ignore OSC, so only perform the query on
// terminals known to support it.
if !codex_core::terminal::user_agent().starts_with("iTerm.app") {
return Ok(None);
}
Comment on lines +107 to +111
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ignore OSC" doesn't make sense; there are a large number of OSC codes and different terminals respond to different subsets of them.


let mut tty = match OpenOptions::new().read(true).write(true).open("/dev/tty") {
Ok(file) => file,
Err(_) => return Ok(None),
Expand Down
Loading