Turn off alternate buffer mode by default. (#13623)

This commit is contained in:
Jacob Richman
2025-11-21 17:30:38 -08:00
committed by GitHub
parent 8c36b10682
commit 5e218a5630
7 changed files with 10 additions and 6 deletions

View File

@@ -240,7 +240,7 @@ their corresponding top-level category object in your `settings.json` file.
- **`ui.useAlternateBuffer`** (boolean): - **`ui.useAlternateBuffer`** (boolean):
- **Description:** Use an alternate screen buffer for the UI, preserving shell - **Description:** Use an alternate screen buffer for the UI, preserving shell
history. history.
- **Default:** `true` - **Default:** `false`
- **Requires restart:** Yes - **Requires restart:** Yes
- **`ui.incrementalRendering`** (boolean): - **`ui.incrementalRendering`** (boolean):

View File

@@ -321,6 +321,9 @@ export class TestRig {
selectedType: 'gemini-api-key', selectedType: 'gemini-api-key',
}, },
}, },
ui: {
useAlternateBuffer: true,
},
model: DEFAULT_GEMINI_MODEL, model: DEFAULT_GEMINI_MODEL,
sandbox: sandbox:
env['GEMINI_SANDBOX'] !== 'false' ? env['GEMINI_SANDBOX'] : false, env['GEMINI_SANDBOX'] !== 'false' ? env['GEMINI_SANDBOX'] : false,

View File

@@ -516,7 +516,7 @@ const SETTINGS_SCHEMA = {
label: 'Use Alternate Screen Buffer', label: 'Use Alternate Screen Buffer',
category: 'UI', category: 'UI',
requiresRestart: true, requiresRestart: true,
default: true, default: false,
description: description:
'Use an alternate screen buffer for the UI, preserving shell history.', 'Use an alternate screen buffer for the UI, preserving shell history.',
showInDialog: true, showInDialog: true,

View File

@@ -509,6 +509,7 @@ describe('startInteractiveUI', () => {
merged: { merged: {
ui: { ui: {
hideWindowTitle: false, hideWindowTitle: false,
useAlternateBuffer: true,
}, },
}, },
} as LoadedSettings; } as LoadedSettings;

View File

@@ -176,7 +176,7 @@ export const renderWithProviders = (
width, width,
mouseEventsEnabled = false, mouseEventsEnabled = false,
config = configProxy as unknown as Config, config = configProxy as unknown as Config,
useAlternateBuffer, useAlternateBuffer = true,
uiActions, uiActions,
}: { }: {
shellFocus?: boolean; shellFocus?: boolean;

View File

@@ -8,7 +8,7 @@ import { useSettings } from '../contexts/SettingsContext.js';
import type { LoadedSettings } from '../../config/settings.js'; import type { LoadedSettings } from '../../config/settings.js';
export const isAlternateBufferEnabled = (settings: LoadedSettings): boolean => export const isAlternateBufferEnabled = (settings: LoadedSettings): boolean =>
settings.merged.ui?.useAlternateBuffer !== false; settings.merged.ui?.useAlternateBuffer === true;
export const useAlternateBuffer = (): boolean => { export const useAlternateBuffer = (): boolean => {
const settings = useSettings(); const settings = useSettings();

View File

@@ -292,8 +292,8 @@
"useAlternateBuffer": { "useAlternateBuffer": {
"title": "Use Alternate Screen Buffer", "title": "Use Alternate Screen Buffer",
"description": "Use an alternate screen buffer for the UI, preserving shell history.", "description": "Use an alternate screen buffer for the UI, preserving shell history.",
"markdownDescription": "Use an alternate screen buffer for the UI, preserving shell history.\n\n- Category: `UI`\n- Requires restart: `yes`\n- Default: `true`", "markdownDescription": "Use an alternate screen buffer for the UI, preserving shell history.\n\n- Category: `UI`\n- Requires restart: `yes`\n- Default: `false`",
"default": true, "default": false,
"type": "boolean" "type": "boolean"
}, },
"incrementalRendering": { "incrementalRendering": {