feat: expose flicker-free mode as a /config toggle (closes #260) (#265)

Add flickerFreeMode to GlobalConfig so external users can enable
fullscreen alt-screen mode via /config instead of having to set
the CLAUDE_CODE_NO_FLICKER=1 env var manually.

Priority order in isFullscreenEnvEnabled():
  CLAUDE_CODE_NO_FLICKER=0  → always off (env wins)
  CLAUDE_CODE_NO_FLICKER=1  → always on (env wins)
  tmux -CC detected         → off (terminal safety guard)
  config flickerFreeMode    → user preference (new)
  USER_TYPE=ant             → internal default

The env var still takes full precedence so existing scripts and
automation are unaffected. The new setting only activates when
flickerFreeMode is explicitly set in config.
This commit is contained in:
KRATOS
2026-04-03 18:47:38 +05:30
committed by GitHub
parent 7c0ea68b65
commit 19c00e67ed
3 changed files with 43 additions and 6 deletions

View File

@@ -464,6 +464,11 @@ export type GlobalConfig = {
// Fullscreen in-app text selection behavior
copyOnSelect?: boolean // Auto-copy to clipboard on mouse-up (undefined → true; lets cmd+c "work" via no-op)
// Flicker-free fullscreen mode (equivalent to CLAUDE_CODE_NO_FLICKER=1 env var).
// When true, enables alt-screen + virtualized scroll for all users.
// Env var still takes precedence: =0 always off, =1 always on.
flickerFreeMode?: boolean
// GitHub repo path mapping for teleport directory switching
// Key: "owner/repo" (lowercase), Value: array of absolute paths where repo is cloned
githubRepoPaths?: Record<string, string[]>
@@ -659,6 +664,7 @@ export const GLOBAL_CONFIG_KEYS = [
'lspRecommendationIgnoredCount',
'copyFullResponse',
'copyOnSelect',
'flickerFreeMode',
'permissionExplainerEnabled',
'prStatusFooterEnabled',
'remoteControlAtStartup',