MCPcopy Create free account
hub / github.com/diillson/chatcli / handleProviderSelection

Method handleProviderSelection

cli/cli_llm.go:226–234  ·  view source on GitHub ↗
(in string)

Source from the content-addressed store, hash-verified

224}
225
226func (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

Callers 1

executorMethod · 0.95

Calls 3

applyProviderSwitchMethod · 0.95
TFunction · 0.92
GetAvailableProvidersMethod · 0.65

Tested by

no test coverage detected