diff options
Diffstat (limited to 'packages/cli/src/ui/components')
| -rw-r--r-- | packages/cli/src/ui/components/AuthDialog.test.tsx | 13 | ||||
| -rw-r--r-- | packages/cli/src/ui/components/AuthDialog.tsx | 7 |
2 files changed, 4 insertions, 16 deletions
diff --git a/packages/cli/src/ui/components/AuthDialog.test.tsx b/packages/cli/src/ui/components/AuthDialog.test.tsx index 65e35332..15c6d68a 100644 --- a/packages/cli/src/ui/components/AuthDialog.test.tsx +++ b/packages/cli/src/ui/components/AuthDialog.test.tsx @@ -31,7 +31,6 @@ describe('AuthDialog', () => { const { lastFrame } = render( <AuthDialog onSelect={() => {}} - onHighlight={() => {}} settings={settings} initialErrorMessage="GEMINI_API_KEY environment variable not found" />, @@ -59,11 +58,7 @@ describe('AuthDialog', () => { ); const { lastFrame, stdin, unmount } = render( - <AuthDialog - onSelect={onSelect} - onHighlight={() => {}} - settings={settings} - />, + <AuthDialog onSelect={onSelect} settings={settings} />, ); await wait(); @@ -96,11 +91,7 @@ describe('AuthDialog', () => { ); const { stdin, unmount } = render( - <AuthDialog - onSelect={onSelect} - onHighlight={() => {}} - settings={settings} - />, + <AuthDialog onSelect={onSelect} settings={settings} />, ); await wait(); diff --git a/packages/cli/src/ui/components/AuthDialog.tsx b/packages/cli/src/ui/components/AuthDialog.tsx index 2a29bbd3..78b825e6 100644 --- a/packages/cli/src/ui/components/AuthDialog.tsx +++ b/packages/cli/src/ui/components/AuthDialog.tsx @@ -13,15 +13,13 @@ import { AuthType } from '@google/gemini-cli-core'; import { validateAuthMethod } from '../../config/auth.js'; interface AuthDialogProps { - onSelect: (authMethod: string | undefined, scope: SettingScope) => void; - onHighlight: (authMethod: string | undefined) => void; + onSelect: (authMethod: AuthType | undefined, scope: SettingScope) => void; settings: LoadedSettings; initialErrorMessage?: string | null; } export function AuthDialog({ onSelect, - onHighlight, settings, initialErrorMessage, }: AuthDialogProps): React.JSX.Element { @@ -45,7 +43,7 @@ export function AuthDialog({ initialAuthIndex = 0; } - const handleAuthSelect = (authMethod: string) => { + const handleAuthSelect = (authMethod: AuthType) => { const error = validateAuthMethod(authMethod); if (error) { setErrorMessage(error); @@ -81,7 +79,6 @@ export function AuthDialog({ items={items} initialIndex={initialAuthIndex} onSelect={handleAuthSelect} - onHighlight={onHighlight} isFocused={true} /> {errorMessage && ( |
