()
| 110 | * opt in). |
| 111 | */ |
| 112 | export function isFullscreenEnvEnabled(): boolean { |
| 113 | // Explicit user opt-out always wins. |
| 114 | if (isEnvDefinedFalsy(process.env.CLAUDE_CODE_NO_FLICKER)) return false |
| 115 | // Explicit opt-in overrides auto-detection (escape hatch). |
| 116 | if (isEnvTruthy(process.env.CLAUDE_CODE_NO_FLICKER)) return true |
| 117 | // Auto-disable under tmux -CC: alt-screen + mouse tracking corrupts |
| 118 | // terminal state on double-click and mouse wheel is dead. |
| 119 | if (isTmuxControlMode()) { |
| 120 | if (!loggedTmuxCcDisable) { |
| 121 | loggedTmuxCcDisable = true |
| 122 | logForDebugging( |
| 123 | 'fullscreen disabled: tmux -CC (iTerm2 integration mode) detected · set CLAUDE_CODE_NO_FLICKER=1 to override', |
| 124 | ) |
| 125 | } |
| 126 | return false |
| 127 | } |
| 128 | return process.env.USER_TYPE === 'ant' |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Whether fullscreen mode should enable SGR mouse tracking (DEC 1000/1002/1006). |
no test coverage detected