mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 21:44:25 -07:00
fix(cli): correct alternate buffer warning logic for JetBrains (#26067)
This commit is contained in:
@@ -85,7 +85,6 @@ import { relaunchOnExitCode } from './utils/relaunch.js';
|
||||
import { loadSandboxConfig } from './config/sandboxConfig.js';
|
||||
import { deleteSession, listSessions } from './utils/sessions.js';
|
||||
import { createPolicyUpdater } from './config/policy.js';
|
||||
import { isAlternateBufferEnabled } from './ui/hooks/useAlternateBuffer.js';
|
||||
|
||||
import { setupTerminalAndTheme } from './utils/terminalTheme.js';
|
||||
import { runDeferredCommand } from './deferred.js';
|
||||
@@ -644,7 +643,7 @@ export async function main() {
|
||||
|
||||
let input = config.getQuestion();
|
||||
const useAlternateBuffer = shouldEnterAlternateScreen(
|
||||
isAlternateBufferEnabled(config),
|
||||
config.getUseAlternateBuffer(),
|
||||
config.getScreenReader(),
|
||||
);
|
||||
const rawStartupWarnings = await rawStartupWarningsPromise;
|
||||
|
||||
@@ -220,5 +220,22 @@ describe('getUserStartupWarnings', () => {
|
||||
);
|
||||
expect(warnings).not.toContainEqual(compWarning);
|
||||
});
|
||||
|
||||
it('should correctly pass isAlternateBuffer option to getCompatibilityWarnings', async () => {
|
||||
const projectDir = path.join(testRootDir, 'project-alt');
|
||||
await fs.mkdir(projectDir);
|
||||
|
||||
await getUserStartupWarnings({}, projectDir, { isAlternateBuffer: true });
|
||||
expect(getCompatibilityWarnings).toHaveBeenCalledWith({
|
||||
isAlternateBuffer: true,
|
||||
});
|
||||
|
||||
await getUserStartupWarnings({}, projectDir, {
|
||||
isAlternateBuffer: false,
|
||||
});
|
||||
expect(getCompatibilityWarnings).toHaveBeenCalledWith({
|
||||
isAlternateBuffer: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user