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

@@ -631,7 +631,26 @@ export function Config({
value: String(copyOnSelect) as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
});
}
}] : []),
}] : []), {
id: 'flickerFreeMode',
label: 'Flicker-free mode',
value: globalConfig.flickerFreeMode ?? (process.env.USER_TYPE === 'ant'),
type: 'boolean' as const,
onChange(flickerFreeMode: boolean) {
saveGlobalConfig(current => ({
...current,
flickerFreeMode
}));
setGlobalConfig({
...getGlobalConfig(),
flickerFreeMode
});
logEvent('tengu_config_changed', {
setting: 'flickerFreeMode' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
value: String(flickerFreeMode) as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
});
}
},
// autoUpdates setting is hidden - use DISABLE_AUTOUPDATER env var to control
autoUpdaterDisabledReason ? {
id: 'autoUpdatesChannel',