fix(patch): cherry-pick 4ef46e4 to release/v0.6.0-preview.4 (#9148)

Co-authored-by: Srinath Padmanabhan <17151014+srithreepo@users.noreply.github.com>
Co-authored-by: Srinath Padmanabhan <srithreepo@google.com>
This commit is contained in:
gemini-cli[bot]
2025-09-22 15:43:45 -07:00
committed by GitHub
parent 0ca8669a80
commit b5af56c200

View File

@@ -7,7 +7,7 @@
import { Box, Newline, Text } from 'ink';
import { RadioButtonSelect } from '../components/shared/RadioButtonSelect.js';
import { usePrivacySettings } from '../hooks/usePrivacySettings.js';
import { CloudPaidPrivacyNotice } from './CloudPaidPrivacyNotice.js';
import type { Config } from '@google/gemini-cli-core';
import { theme } from '../semantic-colors.js';
import { useKeypress } from '../hooks/useKeypress.js';
@@ -26,7 +26,10 @@ export const CloudFreePrivacyNotice = ({
useKeypress(
(key) => {
if (privacyState.error && key.name === 'escape') {
if (
(privacyState.error || privacyState.isFreeTier === false) &&
key.name === 'escape'
) {
onExit();
}
},
@@ -49,7 +52,19 @@ export const CloudFreePrivacyNotice = ({
}
if (privacyState.isFreeTier === false) {
return <CloudPaidPrivacyNotice onExit={onExit} />;
return (
<Box flexDirection="column" marginY={1}>
<Text bold color={theme.text.accent}>
Gemini Code Assist Privacy Notice
</Text>
<Newline />
<Text>
https://developers.google.com/gemini-code-assist/resources/privacy-notices
</Text>
<Newline />
<Text color={theme.text.secondary}>Press Esc to exit.</Text>
</Box>
);
}
const items = [