From dbd626054fe7e8a6b9514c0d1f52dc8beed1b701 Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Mon, 30 Jun 2025 15:53:05 -0700 Subject: Remove unused method (#2721) --- packages/cli/src/ui/components/AuthDialog.test.tsx | 13 ++----------- packages/cli/src/ui/components/AuthDialog.tsx | 7 ++----- 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'packages/cli/src/ui/components') 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( {}} - onHighlight={() => {}} settings={settings} initialErrorMessage="GEMINI_API_KEY environment variable not found" />, @@ -59,11 +58,7 @@ describe('AuthDialog', () => { ); const { lastFrame, stdin, unmount } = render( - {}} - settings={settings} - />, + , ); await wait(); @@ -96,11 +91,7 @@ describe('AuthDialog', () => { ); const { stdin, unmount } = render( - {}} - 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 && ( -- cgit v1.2.3