()
| 23 | * Note: Windows Terminal interprets OSC 9;4 as notifications, not progress. |
| 24 | */ |
| 25 | export function isProgressReportingAvailable(): boolean { |
| 26 | // Only available if we have a TTY (not piped) |
| 27 | if (!process.stdout.isTTY) { |
| 28 | return false |
| 29 | } |
| 30 | |
| 31 | // Explicitly exclude Windows Terminal, which interprets OSC 9;4 as |
| 32 | // notifications rather than progress indicators |
| 33 | if (process.env.WT_SESSION) { |
| 34 | return false |
| 35 | } |
| 36 | |
| 37 | // ConEmu supports OSC 9;4 for progress (all versions) |
| 38 | if ( |
| 39 | process.env.ConEmuANSI || |
| 40 | process.env.ConEmuPID || |
| 41 | process.env.ConEmuTask |
| 42 | ) { |
| 43 | return true |
| 44 | } |
| 45 | |
| 46 | const version = coerce(process.env.TERM_PROGRAM_VERSION) |
| 47 | if (!version) { |
| 48 | return false |
| 49 | } |
| 50 | |
| 51 | // Ghostty 1.2.0+ supports OSC 9;4 for progress |
| 52 | // https://ghostty.org/docs/install/release-notes/1-2-0 |
| 53 | if (process.env.TERM_PROGRAM === 'ghostty') { |
| 54 | return gte(version.version, '1.2.0') |
| 55 | } |
| 56 | |
| 57 | // iTerm2 3.6.6+ supports OSC 9;4 for progress |
| 58 | // https://iterm2.com/downloads.html |
| 59 | if (process.env.TERM_PROGRAM === 'iTerm.app') { |
| 60 | return gte(version.version, '3.6.6') |
| 61 | } |
| 62 | |
| 63 | return false |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Checks if the terminal supports DEC mode 2026 (synchronized output). |
no test coverage detected