Skip to content

Commit

Permalink
fix: remove provider from default on delete (#529)
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
  • Loading branch information
rakshitgondwal and AlexsJones committed Jun 29, 2023
1 parent 5662d59 commit 5a983c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/auth/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ var removeCmd = &cobra.Command{
if b == provider.Name {
foundBackend = true
configAI.Providers = append(configAI.Providers[:i], configAI.Providers[i+1:]...)
if configAI.DefaultProvider == b {
configAI.DefaultProvider = "openai"
}
color.Green("%s deleted from the AI backend provider list", b)
break
}
Expand Down

0 comments on commit 5a983c4

Please sign in to comment.