diff options
| author | Gaurav <[email protected]> | 2025-07-11 14:08:49 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-11 21:08:49 +0000 |
| commit | 764809753ad85ecc209aa9b126efbb3390c03274 (patch) | |
| tree | 09042251c458333eec911e0c54f8bcfd163eac95 /packages/cli/src/ui/hooks/useGeminiStream.ts | |
| parent | a071f604e3880d288304e338bebfa442d729f861 (diff) | |
fix: `TypeError: Cannot read properties of undefined (reading 'authType')` (#3914)
Diffstat (limited to 'packages/cli/src/ui/hooks/useGeminiStream.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/useGeminiStream.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts index 05fb9835..21d57b3b 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.ts +++ b/packages/cli/src/ui/hooks/useGeminiStream.ts @@ -226,7 +226,7 @@ export const useGeminiStream = ( new UserPromptEvent( trimmedQuery.length, prompt_id, - config.getContentGeneratorConfig().authType!, + config.getContentGeneratorConfig()?.authType, trimmedQuery, ), ); @@ -408,7 +408,7 @@ export const useGeminiStream = ( type: MessageType.ERROR, text: parseAndFormatApiError( eventValue.error, - config.getContentGeneratorConfig().authType, + config.getContentGeneratorConfig()?.authType, undefined, config.getModel(), DEFAULT_GEMINI_FLASH_MODEL, @@ -588,7 +588,7 @@ export const useGeminiStream = ( type: MessageType.ERROR, text: parseAndFormatApiError( getErrorMessage(error) || 'Unknown error', - config.getContentGeneratorConfig().authType, + config.getContentGeneratorConfig()?.authType, undefined, config.getModel(), DEFAULT_GEMINI_FLASH_MODEL, |
