Skip to content

Commit fef6c5d

Browse files
committed
fix: address provider selection review
1 parent 4b26069 commit fef6c5d

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎internal/cli/command_center.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func formatProviderCLILine(provider providerCLISummary) string {
419419
}
420420
line := fmt.Sprintf("%s %s [%s] model=%s apiModel=%s api key: %s", marker, displayCLIValue(provider.Name, "none"), displayCLIValue(provider.ProviderKind, "unknown"), displayCLIValue(provider.Model, "none"), displayCLIValue(provider.APIModel, "unknown"), providerCredentialState(provider.providerSummary))
421421
if !provider.Selectable {
422-
line += " (runtime-only; not selectable/saved)"
422+
line += " (not selectable via providers use)"
423423
}
424424
if provider.Message != "" {
425425
line += " (" + provider.Status + ": " + provider.Message + ")"

‎internal/cli/command_center_test.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,12 @@ func TestRunProvidersListMarksUserAndRuntimeProfiles(t *testing.T) {
220220
}
221221

222222
stdout.Reset()
223+
stderr.Reset()
223224
if code := runWithDeps([]string{"providers", "list"}, &stdout, &stderr, deps); code != exitSuccess {
224225
t.Fatalf("code=%d stderr=%s", code, stderr.String())
225226
}
226-
if !strings.Contains(stdout.String(), "runtime-only; not selectable/saved") {
227-
t.Fatalf("runtime marker missing: %s", stdout.String())
227+
if !strings.Contains(stdout.String(), "not selectable via providers use") {
228+
t.Fatalf("non-selectable marker missing: %s", stdout.String())
228229
}
229230
}
230231

‎internal/cli/provider_onboarding_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
)
1313

1414
func TestRunProvidersUseSetsActiveProvider(t *testing.T) {
15+
t.Setenv(config.ActiveProviderEnv, "")
1516
var stdout bytes.Buffer
1617
var stderr bytes.Buffer
1718
configPath := filepath.Join(t.TempDir(), "zero", "config.json")

0 commit comments

Comments
 (0)