diff --git a/src/tui/onboarding.tsx b/src/tui/onboarding.tsx index 9e5280e15..32745a4d8 100644 --- a/src/tui/onboarding.tsx +++ b/src/tui/onboarding.tsx @@ -30,7 +30,7 @@ const FIELD_LABELS: Record = { }; const FIELD_HINTS: Record = { - name: "openai, anthropic, fireworks, ...", + name: "openai, anthropic, ollama, ...", baseURL: "https://api.openai.com/v1", apiKey: "sk-... (blank for keyless/local)", model: "gpt-4o", @@ -181,9 +181,20 @@ export function ProviderSetupPanel({ onSubmit, showTelemetryNotice }: ProviderSe {/* Main content */} - - - No inference provider is configured. Add one to get started. + + + Welcome — connect an inference provider + + + Step {fieldIndex + 1} of {FIELDS.length}: {FIELD_LABELS[currentField]} + {" — "} + {currentField === "name" && "name it (openai, anthropic, ollama, …)"} + {currentField === "baseURL" && "paste the API base URL (include /v1 if required)"} + {currentField === "apiKey" && "API key (blank for local/keyless)"} + {currentField === "model" && "default model, then Enter to test & save"} + + + After setup, switch providers with /model diff --git a/tests/unit/tui/onboarding.test.tsx b/tests/unit/tui/onboarding.test.tsx index 3ddf340ff..843491591 100644 --- a/tests/unit/tui/onboarding.test.tsx +++ b/tests/unit/tui/onboarding.test.tsx @@ -49,6 +49,15 @@ test("shows Provider name label on mount", () => { expect(lastFrame()).toContain("Provider name"); }); +test("shows welcome and step copy on mount", () => { + const { lastFrame } = renderPanel(); + const frame = lastFrame() ?? ""; + // Fixed-height panel (rows fallback 24) can flex-shrink the bold welcome + // line under ink-testing-library; assert the step banner that always shows. + expect(frame).toContain("Provider setup"); + expect(frame).toContain("Step 1 of 4"); +}); + test("shows all field labels", () => { const { lastFrame } = renderPanel(); expect(lastFrame()).toContain("Provider name");