fix(auth): Return empty map if token file does not exits, and refacto… (#12332)

Co-authored-by: Sandy Tao <sandytao520@icloud.com>
This commit is contained in:
Gal Zahavi
2025-11-03 15:07:22 -08:00
committed by GitHub
parent 7a515339ea
commit 2144d25885
6 changed files with 23 additions and 22 deletions

View File

@@ -433,6 +433,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
const handleApiKeySubmit = useCallback(
async (apiKey: string) => {
try {
onAuthError(null);
if (!apiKey.trim() && apiKey.length > 1) {
onAuthError(
'API key cannot be empty string with length greater than 1.',