- {/* Define the providers */}
- {(() => {
- // Provider card configuration
- const baseProviders = [
- {
- slug: "requesty",
- name: "Requesty",
- description: t("welcome:routers.requesty.description"),
- incentive: t("welcome:routers.requesty.incentive"),
- authUrl: getRequestyAuthUrl(uriScheme),
- },
- {
- slug: "openrouter",
- name: "OpenRouter",
- description: t("welcome:routers.openrouter.description"),
- authUrl: getOpenRouterAuthUrl(uriScheme),
- },
- ]
-
- // Conditionally add Roo provider based on feature flag
- const providers = showRooProvider
- ? [
- ...baseProviders,
- {
- slug: "roo",
- name: "Roo Code Cloud",
- description: t("welcome:routers.roo.description"),
- incentive: t("welcome:routers.roo.incentive"),
- authUrl: "#", // Placeholder since onClick handler will prevent default
- },
- ]
- : baseProviders
-
- // Shuffle providers based on machine ID (will be consistent for the same machine)
- const orderedProviders = [...providers]
- knuthShuffle(orderedProviders, (machineId as any) || Date.now())
-
- // Render the provider cards
- return orderedProviders.map((provider, index) => (
-
{
- // Track telemetry for featured provider click
- telemetryClient.capture(TelemetryEventName.FEATURED_PROVIDER_CLICKED, {
- provider: provider.slug,
- })
-
- // Special handling for Roo provider
- if (provider.slug === "roo") {
- e.preventDefault()
-
- // Set the Roo provider configuration
- const rooConfig: ProviderSettings = {
- apiProvider: "roo",
- }
-
- // Save the Roo provider configuration
- vscode.postMessage({
- type: "upsertApiConfiguration",
- text: currentApiConfigName,
- apiConfiguration: rooConfig,
- })
-
- // Then trigger cloud sign-in
- vscode.postMessage({ type: "rooCloudSignIn" })
- }
- // For other providers, let the default link behavior work
- }}>
- {provider.incentive && (
-
- {provider.incentive}
-
- )}
-
-

-
-
-
- {provider.name}
-
-
- {provider.description}
-
-
-
- ))
- })()}
-