Skip to content

Commit 403de46

Browse files
Brooooooklynclaude
andcommitted
fix(cli): adopt DA1 sandwich technique for robust OSC color query detection
Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a comprehensive `is_osc_query_unsupported()` pre-screen modelled after `terminal-colorsaurus`, and implement the DA1 sandwich technique to detect unsupported terminals at runtime without waiting for timeouts. Key changes: - Centralized quirks detection covering CI, Docker, devcontainers, Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb - DA1 sentinel query appended after OSC queries; if its response arrives first the terminal doesn't support OSC and we bail immediately - drain_da1() consumes the trailing DA1 response to prevent leaks - BEL terminator instead of ST to work around urxvt response bug - SSH-aware timeout (1000ms vs 200ms local) - Ported regression test from terminal-colorsaurus issue #38 - Extended test coverage for parsing edge cases Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e3607ec commit 403de46

1 file changed

Lines changed: 307 additions & 22 deletions

File tree

0 commit comments

Comments
 (0)