(in string)
| 224 | } |
| 225 | |
| 226 | func (cli *ChatCLI) handleProviderSelection(in string) { |
| 227 | availableProviders := cli.manager.GetAvailableProviders() |
| 228 | choiceIndex, err := strconv.Atoi(in) |
| 229 | if err != nil || choiceIndex < 1 || choiceIndex > len(availableProviders) { |
| 230 | fmt.Println(i18n.T("error.invalid_choice_normal_mode")) |
| 231 | return |
| 232 | } |
| 233 | _ = cli.applyProviderSwitch(cli.sessionCtx, availableProviders[choiceIndex-1]) |
| 234 | } |
| 235 | |
| 236 | // providerDefaultModel returns the model a provider should start on when no |
| 237 | // explicit model is given — the configured env override, else the built-in |
no test coverage detected