Files
gemini-cli/packages/cli/src/ui/hooks/useAlternateBuffer.ts
T

18 lines
522 B
TypeScript
Raw Normal View History

2025-11-11 07:50:11 -08:00
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { useConfig } from '../contexts/ConfigContext.js';
import type { Config } from '@google/gemini-cli-core';
export const isAlternateBufferEnabled = (config: Config): boolean =>
config.getUseAlternateBuffer();
2025-11-11 07:50:11 -08:00
// This is read from Config so that the UI reads the same value per application session
2025-11-11 07:50:11 -08:00
export const useAlternateBuffer = (): boolean => {
const config = useConfig();
return isAlternateBufferEnabled(config);
2025-11-11 07:50:11 -08:00
};