mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-18 18:11:02 -07:00
Revert "feat(accessibility): implement centralized screen reader layo… (#9255)
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { useUIState } from '../contexts/UIStateContext.js';
|
||||
import { useConfig } from '../contexts/ConfigContext.js';
|
||||
import { useSettings } from '../contexts/SettingsContext.js';
|
||||
|
||||
export const useFooterProps = () => {
|
||||
const uiState = useUIState();
|
||||
const config = useConfig();
|
||||
const settings = useSettings();
|
||||
|
||||
return {
|
||||
model: config.getModel(),
|
||||
targetDir: config.getTargetDir(),
|
||||
debugMode: config.getDebugMode(),
|
||||
branchName: uiState.branchName,
|
||||
debugMessage: uiState.debugMessage,
|
||||
corgiMode: uiState.corgiMode,
|
||||
errorCount: uiState.errorCount,
|
||||
showErrorDetails: uiState.showErrorDetails,
|
||||
showMemoryUsage:
|
||||
config.getDebugMode() || settings.merged.ui?.showMemoryUsage || false,
|
||||
promptTokenCount: uiState.sessionStats.lastPromptTokenCount,
|
||||
nightly: uiState.nightly,
|
||||
isTrustedFolder: uiState.isTrustedFolder,
|
||||
vimMode: undefined,
|
||||
};
|
||||
};
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { useIsScreenReaderEnabled } from 'ink';
|
||||
|
||||
export interface LayoutConfig {
|
||||
shouldUseStatic: boolean;
|
||||
shouldShowFooterInComposer: boolean;
|
||||
mode: 'default' | 'screenReader';
|
||||
allowStaticToggle?: boolean;
|
||||
}
|
||||
|
||||
export interface LayoutConfigOptions {
|
||||
forceStaticMode?: boolean;
|
||||
allowToggle?: boolean;
|
||||
}
|
||||
|
||||
export const useLayoutConfig = (
|
||||
options?: LayoutConfigOptions,
|
||||
): LayoutConfig => {
|
||||
const isScreenReader = useIsScreenReaderEnabled();
|
||||
|
||||
// Allow overriding static behavior when toggle is enabled
|
||||
const shouldUseStatic =
|
||||
options?.forceStaticMode !== undefined
|
||||
? options.forceStaticMode
|
||||
: !isScreenReader;
|
||||
|
||||
return {
|
||||
shouldUseStatic,
|
||||
shouldShowFooterInComposer: !isScreenReader,
|
||||
mode: isScreenReader ? 'screenReader' : 'default',
|
||||
allowStaticToggle: options?.allowToggle ?? false,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user