mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 02:30:22 +00:00
fix(onboarding): hide image-only auth providers
This commit is contained in:
@@ -79,6 +79,7 @@ describe("provider wizard boundaries", () => {
|
||||
choiceLabel: "OpenAI API key",
|
||||
groupId: "openai",
|
||||
groupLabel: "OpenAI",
|
||||
onboardingScopes: ["text-inference"],
|
||||
},
|
||||
run: vi.fn(),
|
||||
},
|
||||
@@ -92,6 +93,7 @@ describe("provider wizard boundaries", () => {
|
||||
label: "OpenAI API key",
|
||||
groupId: "openai",
|
||||
groupLabel: "OpenAI",
|
||||
onboardingScopes: ["text-inference"],
|
||||
},
|
||||
]);
|
||||
expect(
|
||||
@@ -106,6 +108,39 @@ describe("provider wizard boundaries", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("preserves onboarding scopes on wizard options", () => {
|
||||
const provider = makeProvider({
|
||||
id: "fal",
|
||||
label: "fal",
|
||||
auth: [
|
||||
{
|
||||
id: "api-key",
|
||||
label: "fal API key",
|
||||
kind: "api_key",
|
||||
wizard: {
|
||||
choiceId: "fal-api-key",
|
||||
choiceLabel: "fal API key",
|
||||
groupId: "fal",
|
||||
groupLabel: "fal",
|
||||
onboardingScopes: ["image-generation"],
|
||||
},
|
||||
run: vi.fn(),
|
||||
},
|
||||
],
|
||||
});
|
||||
resolvePluginProviders.mockReturnValue([provider]);
|
||||
|
||||
expect(resolveProviderWizardOptions({})).toEqual([
|
||||
{
|
||||
value: "fal-api-key",
|
||||
label: "fal API key",
|
||||
groupId: "fal",
|
||||
groupLabel: "fal",
|
||||
onboardingScopes: ["image-generation"],
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("returns method wizard metadata for canonical choices", () => {
|
||||
const provider = makeProvider({
|
||||
id: "anthropic",
|
||||
|
||||
Reference in New Issue
Block a user