mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-06 14:07:29 +08:00
fix: simplify gemini login by directly asking for API key
This commit is contained in:
BIN
clawgo_bin
Executable file
BIN
clawgo_bin
Executable file
Binary file not shown.
@@ -1222,15 +1222,11 @@ func configureProvider(cfg *config.Config, provider string) {
|
|||||||
|
|
||||||
switch provider {
|
switch provider {
|
||||||
case "Gemini":
|
case "Gemini":
|
||||||
fmt.Println("Do you want to use gemini-cli authentication? (y/n): ")
|
fmt.Print("Enter Gemini API Key: ")
|
||||||
var useCLI string
|
var apiKey string
|
||||||
fmt.Scanln(&useCLI)
|
fmt.Scanln(&apiKey)
|
||||||
if strings.ToLower(useCLI) == "y" {
|
cfg.Providers.Gemini.APIKey = apiKey
|
||||||
if err := exec.Command("gemini", "login").Run(); err != nil {
|
return
|
||||||
fmt.Printf("Error running gemini login: %v\n", err)
|
|
||||||
}
|
|
||||||
return // Config handled by gemini-cli
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Print("Enter API Key: ")
|
fmt.Print("Enter API Key: ")
|
||||||
|
|||||||
Reference in New Issue
Block a user