mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-08-09 08:27:00 -07:00
feat(voice): add privacy and compliance UX warning for Gemini Live backend (#26454)
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
type WhisperModelProgress,
|
||||
} from '@google/gemini-cli-core';
|
||||
import { CliSpinner } from './CliSpinner.js';
|
||||
import { WarningMessage } from './messages/WarningMessage.js';
|
||||
|
||||
interface VoiceModelDialogProps {
|
||||
onClose: () => void;
|
||||
@@ -68,6 +69,9 @@ export function VoiceModelDialog({
|
||||
const currentWhisperModel =
|
||||
settings.merged.experimental.voice?.whisperModel ?? 'ggml-base.en.bin';
|
||||
|
||||
const [highlightedBackend, setHighlightedBackend] =
|
||||
useState<string>(currentBackend);
|
||||
|
||||
const handleKeypress = useCallback(
|
||||
(key: Key) => {
|
||||
if (key.name === 'escape') {
|
||||
@@ -101,6 +105,10 @@ export function VoiceModelDialog({
|
||||
[setSetting, onClose],
|
||||
);
|
||||
|
||||
const handleBackendHighlight = useCallback((value: string) => {
|
||||
setHighlightedBackend(value);
|
||||
}, []);
|
||||
|
||||
const handleWhisperModelSelect = useCallback(
|
||||
async (modelName: string) => {
|
||||
if (modelManager.isModelInstalled(modelName)) {
|
||||
@@ -203,14 +211,22 @@ export function VoiceModelDialog({
|
||||
</Box>
|
||||
</Box>
|
||||
) : (
|
||||
<Box marginTop={1}>
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{view === 'backend' ? (
|
||||
<DescriptiveRadioButtonSelect
|
||||
items={backendOptions}
|
||||
onSelect={handleBackendSelect}
|
||||
initialIndex={currentBackend === 'whisper' ? 1 : 0}
|
||||
showNumbers={true}
|
||||
/>
|
||||
<>
|
||||
<DescriptiveRadioButtonSelect
|
||||
items={backendOptions}
|
||||
onSelect={handleBackendSelect}
|
||||
onHighlight={handleBackendHighlight}
|
||||
initialIndex={currentBackend === 'whisper' ? 1 : 0}
|
||||
showNumbers={true}
|
||||
/>
|
||||
{highlightedBackend === 'gemini-live' && (
|
||||
<Box marginTop={1}>
|
||||
<WarningMessage text="When using the Gemini Live backend, voice recordings are sent to Google Cloud for transcription. Enterprise users should verify this aligns with their data privacy and compliance requirements." />
|
||||
</Box>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<DescriptiveRadioButtonSelect
|
||||
items={whisperOptions}
|
||||
|
||||
Reference in New Issue
Block a user