fix: simplify gemini login by directly asking for API key

This commit is contained in:
DBT
2026-02-12 03:41:47 +00:00
parent cb3f704f17
commit af86e93e66
2 changed files with 5 additions and 9 deletions

BIN
clawgo_bin Executable file

Binary file not shown.

View File

@@ -1222,15 +1222,11 @@ func configureProvider(cfg *config.Config, provider string) {
switch provider {
case "Gemini":
fmt.Println("Do you want to use gemini-cli authentication? (y/n): ")
var useCLI string
fmt.Scanln(&useCLI)
if strings.ToLower(useCLI) == "y" {
if err := exec.Command("gemini", "login").Run(); err != nil {
fmt.Printf("Error running gemini login: %v\n", err)
}
return // Config handled by gemini-cli
}
fmt.Print("Enter Gemini API Key: ")
var apiKey string
fmt.Scanln(&apiKey)
cfg.Providers.Gemini.APIKey = apiKey
return
}
fmt.Print("Enter API Key: ")