feat: provider cmd — list, use, add with interactive key input

This commit is contained in:
2026-07-28 16:08:05 +08:00
parent b4bc96b44d
commit 1bff97b434
3 changed files with 100 additions and 0 deletions
+5
View File
@@ -38,6 +38,11 @@ Use "ry [command] --help" for more information about a command.`,
return fmt.Errorf("load config: %w", err)
}
// provider subcommands don't need an initialized provider
if cmd.Annotations != nil && cmd.Annotations["skipProvider"] == "true" {
return nil
}
providerName := cfg.CurrentProvider
if flagProvider != "" {
providerName = flagProvider