From f65fccf81f8a188d65c86abf2bf3c223837dbef5 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 25 Sep 2025 13:15:16 -0400 Subject: [PATCH 1/4] Show the Roo provider on the welcome screen --- src/assets/images/roo.png | Bin 0 -> 4044 bytes .../src/components/welcome/WelcomeView.tsx | 47 ++++++++++++++---- webview-ui/src/i18n/locales/ca/welcome.json | 4 ++ webview-ui/src/i18n/locales/de/welcome.json | 4 ++ webview-ui/src/i18n/locales/en/welcome.json | 4 ++ webview-ui/src/i18n/locales/es/welcome.json | 4 ++ webview-ui/src/i18n/locales/fr/welcome.json | 4 ++ webview-ui/src/i18n/locales/hi/welcome.json | 4 ++ webview-ui/src/i18n/locales/id/welcome.json | 4 ++ webview-ui/src/i18n/locales/it/welcome.json | 4 ++ webview-ui/src/i18n/locales/ja/welcome.json | 4 ++ webview-ui/src/i18n/locales/ko/welcome.json | 4 ++ webview-ui/src/i18n/locales/nl/welcome.json | 4 ++ webview-ui/src/i18n/locales/pl/welcome.json | 4 ++ .../src/i18n/locales/pt-BR/welcome.json | 4 ++ webview-ui/src/i18n/locales/ru/welcome.json | 4 ++ webview-ui/src/i18n/locales/tr/welcome.json | 4 ++ webview-ui/src/i18n/locales/vi/welcome.json | 4 ++ .../src/i18n/locales/zh-CN/welcome.json | 4 ++ .../src/i18n/locales/zh-TW/welcome.json | 4 ++ 20 files changed, 110 insertions(+), 9 deletions(-) create mode 100644 src/assets/images/roo.png diff --git a/src/assets/images/roo.png b/src/assets/images/roo.png new file mode 100644 index 0000000000000000000000000000000000000000..5dfc8723e838713d3a560ad1fe325c507411ae44 GIT binary patch literal 4044 zcmd^C_dDEAv|g)+#YXS#tBbyf5{uPa5WPh2f+fhxDk-a%AbMFXdW%K$F3}Q1)P$%} zVuk1>?&tm+_x><5&vTxcXWsWcXU?1x`_NDea);#(2n2%YXd_I375Be`j0BjKCrG4# zg&@#GOAS=_nQaFIqQ>YTR3C-f@8^>ym<=%wQ**uOHQ|}2H-N{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l9l&M!j@Z=!$Df)_9Qo_HJystU5~=& ziGlqAb+RU6^01n@-i5`yt>CKpu1zvr*uI*5th$n^iOCFxSOAm4jtqA&dA(%_fHjo+ zXtAo#C^{OFV??Cm(6Eys{VIvCyMzlsm%Cn_5=NB5vzJO6-#oCEe=L;hN)|*kQ)k^= zrCa$^CWQ3Jiz^B;5OVpMd-5`;t$nTQY}s^VK7VUaUDM1(nP&!tqy&D5L~EZwLw zEl(;@Nbx3Is-r1r~5As<=m!M8sQ%d}#9IXC5G6j%o*A zk<-o`QuTcn?VC6Z(oEV99Xt8084BLlgeBMYi8^_CRp}0~jy6z`#D4Sa1ES2Bzx2tE zc42R?3SxaGl*45nt2=p6`Wp!P3P_6&Q`6Gasg!B(>I{4?d*!Zmpu$O#l&JOTlu~vr z3Q}p8Umq*$5<-d0W8thInVgiYtcqFH=p2o~3!yC4(nE4z8A7s6M}~k!oTutiETPO} z)DGVT@Rk$sMmUy_0ztU+FB{#FsMFsI!s1#D5Q6!|*R|I3(b^qA1o|>Tvor>w!}5fZ zDXZ8E^IB`k2rV~iVyKSvczM7ITW?(RWFLbBcX;AvnUec!qwTEoUM?$$8loUen zHM16ht9PShnKp9`1{_N)sS^VS37KVAX6x*7p~*I2fRg;|#nGl|`LNTKxf^CxvrP9b zkQIlqv;?%NiW#s2`KX@p<^ literal 0 HcmV?d00001 diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx index 12ef319f92..4b5f4c5c0b 100644 --- a/webview-ui/src/components/welcome/WelcomeView.tsx +++ b/webview-ui/src/components/welcome/WelcomeView.tsx @@ -83,6 +83,13 @@ const WelcomeView = () => { description: t("welcome:routers.openrouter.description"), authUrl: getOpenRouterAuthUrl(uriScheme), }, + { + 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 + }, ] // Shuffle providers based on machine ID (will be consistent for the same machine) @@ -94,9 +101,36 @@ const WelcomeView = () => { + rel="noopener noreferrer" + onClick={(e) => { + // 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} -
- {provider.incentive && ( -
{provider.incentive}
- )} +
+ {provider.description}
diff --git a/webview-ui/src/i18n/locales/ca/welcome.json b/webview-ui/src/i18n/locales/ca/welcome.json index 4b3e75a3e1..c819a48a19 100644 --- a/webview-ui/src/i18n/locales/ca/welcome.json +++ b/webview-ui/src/i18n/locales/ca/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Una interfície unificada per a LLMs" + }, + "roo": { + "description": "Els millors models gratuïts per començar", + "incentive": "Prova Roo gratis" } }, "chooseProvider": "Per fer la seva màgia, Roo necessita una clau API.", diff --git a/webview-ui/src/i18n/locales/de/welcome.json b/webview-ui/src/i18n/locales/de/welcome.json index 13cf9f8687..a95ff10373 100644 --- a/webview-ui/src/i18n/locales/de/welcome.json +++ b/webview-ui/src/i18n/locales/de/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Eine einheitliche Schnittstelle für LLMs" + }, + "roo": { + "description": "Die besten kostenlosen Modelle für den Einstieg", + "incentive": "Probier Roo kostenlos aus" } }, "chooseProvider": "Um seine Magie zu entfalten, benötigt Roo einen API-Schlüssel.", diff --git a/webview-ui/src/i18n/locales/en/welcome.json b/webview-ui/src/i18n/locales/en/welcome.json index b19245fa8e..5cb9b488dc 100644 --- a/webview-ui/src/i18n/locales/en/welcome.json +++ b/webview-ui/src/i18n/locales/en/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "A unified interface for LLMs" + }, + "roo": { + "description": "The best free models to get started", + "incentive": "Try Roo out for free" } }, "chooseProvider": "To do its magic, Roo needs an API key.", diff --git a/webview-ui/src/i18n/locales/es/welcome.json b/webview-ui/src/i18n/locales/es/welcome.json index 2a3a80751a..2f7217d4f3 100644 --- a/webview-ui/src/i18n/locales/es/welcome.json +++ b/webview-ui/src/i18n/locales/es/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Una interfaz unificada para LLMs" + }, + "roo": { + "description": "Los mejores modelos gratuitos para empezar", + "incentive": "Prueba Roo gratis" } }, "chooseProvider": "Para hacer su magia, Roo necesita una clave API.", diff --git a/webview-ui/src/i18n/locales/fr/welcome.json b/webview-ui/src/i18n/locales/fr/welcome.json index 7c3ce18d65..a1e692bb84 100644 --- a/webview-ui/src/i18n/locales/fr/welcome.json +++ b/webview-ui/src/i18n/locales/fr/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Une interface unifiée pour les LLMs" + }, + "roo": { + "description": "Les meilleurs modèles gratuits pour commencer", + "incentive": "Essayez Roo gratuitement" } }, "chooseProvider": "Pour faire sa magie, Roo a besoin d'une clé API.", diff --git a/webview-ui/src/i18n/locales/hi/welcome.json b/webview-ui/src/i18n/locales/hi/welcome.json index 03dffc9052..279f588d70 100644 --- a/webview-ui/src/i18n/locales/hi/welcome.json +++ b/webview-ui/src/i18n/locales/hi/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "LLMs के लिए एक एकीकृत इंटरफेस" + }, + "roo": { + "description": "शुरू करने के लिए सर्वोत्तम निःशुल्क मॉडल", + "incentive": "Roo को निःशुल्क आज़माएं" } }, "chooseProvider": "अपना जादू दिखाने के लिए, Roo को एक API कुंजी की आवश्यकता है।", diff --git a/webview-ui/src/i18n/locales/id/welcome.json b/webview-ui/src/i18n/locales/id/welcome.json index 49efa819e2..73eacc3b1e 100644 --- a/webview-ui/src/i18n/locales/id/welcome.json +++ b/webview-ui/src/i18n/locales/id/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Interface terpadu untuk LLM" + }, + "roo": { + "description": "Model gratis terbaik untuk memulai", + "incentive": "Coba Roo gratis" } }, "chooseProvider": "Untuk melakukan keajaibannya, Roo membutuhkan API key.", diff --git a/webview-ui/src/i18n/locales/it/welcome.json b/webview-ui/src/i18n/locales/it/welcome.json index 5bc96b045f..46efe5ef62 100644 --- a/webview-ui/src/i18n/locales/it/welcome.json +++ b/webview-ui/src/i18n/locales/it/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Un'interfaccia unificata per LLMs" + }, + "roo": { + "description": "I migliori modelli gratuiti per iniziare", + "incentive": "Prova Roo gratuitamente" } }, "chooseProvider": "Per fare la sua magia, Roo ha bisogno di una chiave API.", diff --git a/webview-ui/src/i18n/locales/ja/welcome.json b/webview-ui/src/i18n/locales/ja/welcome.json index a1a13015b8..946f6f2322 100644 --- a/webview-ui/src/i18n/locales/ja/welcome.json +++ b/webview-ui/src/i18n/locales/ja/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "LLMsのための統一インターフェース" + }, + "roo": { + "description": "始めるための最高の無料モデル", + "incentive": "Rooを無料で試す" } }, "chooseProvider": "Rooが機能するには、APIキーが必要です。", diff --git a/webview-ui/src/i18n/locales/ko/welcome.json b/webview-ui/src/i18n/locales/ko/welcome.json index bd00d8a2aa..2f65841df4 100644 --- a/webview-ui/src/i18n/locales/ko/welcome.json +++ b/webview-ui/src/i18n/locales/ko/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "LLM을 위한 통합 인터페이스" + }, + "roo": { + "description": "시작하기에 최고의 무료 모델", + "incentive": "Roo를 무료로 체험해보세요" } }, "chooseProvider": "Roo가 작동하려면 API 키가 필요합니다.", diff --git a/webview-ui/src/i18n/locales/nl/welcome.json b/webview-ui/src/i18n/locales/nl/welcome.json index 625122816d..912b38e3ee 100644 --- a/webview-ui/src/i18n/locales/nl/welcome.json +++ b/webview-ui/src/i18n/locales/nl/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Een uniforme interface voor LLM's" + }, + "roo": { + "description": "De beste gratis modellen om mee te beginnen", + "incentive": "Probeer Roo gratis uit" } }, "chooseProvider": "Om zijn magie te doen, heeft Roo een API-sleutel nodig.", diff --git a/webview-ui/src/i18n/locales/pl/welcome.json b/webview-ui/src/i18n/locales/pl/welcome.json index 7bddbac4cb..8e63cf9d8f 100644 --- a/webview-ui/src/i18n/locales/pl/welcome.json +++ b/webview-ui/src/i18n/locales/pl/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Ujednolicony interfejs dla LLMs" + }, + "roo": { + "description": "Najlepsze darmowe modele na start", + "incentive": "Wypróbuj Roo za darmo" } }, "chooseProvider": "Aby działać, Roo potrzebuje klucza API.", diff --git a/webview-ui/src/i18n/locales/pt-BR/welcome.json b/webview-ui/src/i18n/locales/pt-BR/welcome.json index fced51060f..489841a78f 100644 --- a/webview-ui/src/i18n/locales/pt-BR/welcome.json +++ b/webview-ui/src/i18n/locales/pt-BR/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Uma interface unificada para LLMs" + }, + "roo": { + "description": "Os melhores modelos gratuitos para começar", + "incentive": "Experimente o Roo gratuitamente" } }, "chooseProvider": "Para fazer sua mágica, o Roo precisa de uma chave API.", diff --git a/webview-ui/src/i18n/locales/ru/welcome.json b/webview-ui/src/i18n/locales/ru/welcome.json index b8400444a0..978cfc066b 100644 --- a/webview-ui/src/i18n/locales/ru/welcome.json +++ b/webview-ui/src/i18n/locales/ru/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Унифицированный интерфейс для LLM" + }, + "roo": { + "description": "Лучшие бесплатные модели для начала работы", + "incentive": "Попробуй Roo бесплатно" } }, "chooseProvider": "Для своей магии Roo нуждается в API-ключе.", diff --git a/webview-ui/src/i18n/locales/tr/welcome.json b/webview-ui/src/i18n/locales/tr/welcome.json index 7551676c6c..ff79c4f98a 100644 --- a/webview-ui/src/i18n/locales/tr/welcome.json +++ b/webview-ui/src/i18n/locales/tr/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "LLM'ler için birleşik bir arayüz" + }, + "roo": { + "description": "Başlamak için en iyi ücretsiz modeller", + "incentive": "Roo'yu ücretsiz dene" } }, "chooseProvider": "Sihirini yapabilmesi için Roo'nun bir API anahtarına ihtiyacı var.", diff --git a/webview-ui/src/i18n/locales/vi/welcome.json b/webview-ui/src/i18n/locales/vi/welcome.json index 275bc5039d..6a6545c3ab 100644 --- a/webview-ui/src/i18n/locales/vi/welcome.json +++ b/webview-ui/src/i18n/locales/vi/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "Giao diện thống nhất cho các LLM" + }, + "roo": { + "description": "Những mô hình miễn phí tốt nhất để bắt đầu", + "incentive": "Dùng thử Roo miễn phí" } }, "chooseProvider": "Để thực hiện phép màu của mình, Roo cần một khóa API.", diff --git a/webview-ui/src/i18n/locales/zh-CN/welcome.json b/webview-ui/src/i18n/locales/zh-CN/welcome.json index a53adf08cd..d4fe595e14 100644 --- a/webview-ui/src/i18n/locales/zh-CN/welcome.json +++ b/webview-ui/src/i18n/locales/zh-CN/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "统一了大语言模型的接口" + }, + "roo": { + "description": "最优秀的免费模型助你开始", + "incentive": "免费试用 Roo" } }, "chooseProvider": "Roo 需要一个 API 密钥才能发挥魔力。", diff --git a/webview-ui/src/i18n/locales/zh-TW/welcome.json b/webview-ui/src/i18n/locales/zh-TW/welcome.json index de1beb9ffe..ed4526844b 100644 --- a/webview-ui/src/i18n/locales/zh-TW/welcome.json +++ b/webview-ui/src/i18n/locales/zh-TW/welcome.json @@ -10,6 +10,10 @@ }, "openrouter": { "description": "LLM 的統一介面" + }, + "roo": { + "description": "最優秀的免費模型助你開始", + "incentive": "免費試用 Roo" } }, "chooseProvider": "Roo 需要 API 金鑰才能發揮魔力。", From 024973b2e488ab3f5478b54f49115f6f5a17b545 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 25 Sep 2025 14:35:53 -0400 Subject: [PATCH 2/4] Put it behind a posthog feature flag --- .../src/components/welcome/WelcomeView.tsx | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx index 4b5f4c5c0b..25b5293c87 100644 --- a/webview-ui/src/components/welcome/WelcomeView.tsx +++ b/webview-ui/src/components/welcome/WelcomeView.tsx @@ -1,7 +1,8 @@ -import { useCallback, useState } from "react" +import { useCallback, useState, useEffect } from "react" import knuthShuffle from "knuth-shuffle-seeded" import { Trans } from "react-i18next" import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" +import posthog from "posthog-js" import type { ProviderSettings } from "@roo-code/types" @@ -20,6 +21,14 @@ const WelcomeView = () => { const { apiConfiguration, currentApiConfigName, setApiConfiguration, uriScheme, machineId } = useExtensionState() const { t } = useAppTranslation() const [errorMessage, setErrorMessage] = useState(undefined) + const [showRooProvider, setShowRooProvider] = useState(false) + + // Check PostHog feature flag for Roo provider + useEffect(() => { + posthog.onFeatureFlags(function () { + setShowRooProvider(posthog?.getFeatureFlag("roo-provider-featured") === "test") + }) + }, []) // Memoize the setApiConfigurationField function to pass to ApiOptions const setApiConfigurationFieldForApiOptions = useCallback( @@ -69,7 +78,7 @@ const WelcomeView = () => { {/* Define the providers */} {(() => { // Provider card configuration - const providers = [ + const baseProviders = [ { slug: "requesty", name: "Requesty", @@ -83,15 +92,22 @@ const WelcomeView = () => { description: t("welcome:routers.openrouter.description"), authUrl: getOpenRouterAuthUrl(uriScheme), }, - { - 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 - }, ] + // 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()) From ef580f94b36af94929f4894cdce3f218ba503cd7 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 25 Sep 2025 14:54:39 -0400 Subject: [PATCH 3/4] PR feedback --- webview-ui/src/components/welcome/WelcomeView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx index 25b5293c87..78ff6b84c9 100644 --- a/webview-ui/src/components/welcome/WelcomeView.tsx +++ b/webview-ui/src/components/welcome/WelcomeView.tsx @@ -143,7 +143,7 @@ const WelcomeView = () => { // For other providers, let the default link behavior work }}> {provider.incentive && ( -
+
{provider.incentive}
)} From 376c8f1c2d9dca3b237e2c312e8791d2e3f377fe Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 25 Sep 2025 15:13:44 -0400 Subject: [PATCH 4/4] Track clicks --- packages/types/src/telemetry.ts | 3 +++ webview-ui/src/components/welcome/WelcomeView.tsx | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/packages/types/src/telemetry.ts b/packages/types/src/telemetry.ts index bba1485722..fe9b49e6f8 100644 --- a/packages/types/src/telemetry.ts +++ b/packages/types/src/telemetry.ts @@ -61,6 +61,8 @@ export enum TelemetryEventName { ACCOUNT_LOGOUT_CLICKED = "Account Logout Clicked", ACCOUNT_LOGOUT_SUCCESS = "Account Logout Success", + FEATURED_PROVIDER_CLICKED = "Featured Provider Clicked", + SCHEMA_VALIDATION_ERROR = "Schema Validation Error", DIFF_APPLICATION_ERROR = "Diff Application Error", SHELL_INTEGRATION_ERROR = "Shell Integration Error", @@ -181,6 +183,7 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [ TelemetryEventName.ACCOUNT_CONNECT_SUCCESS, TelemetryEventName.ACCOUNT_LOGOUT_CLICKED, TelemetryEventName.ACCOUNT_LOGOUT_SUCCESS, + TelemetryEventName.FEATURED_PROVIDER_CLICKED, TelemetryEventName.SCHEMA_VALIDATION_ERROR, TelemetryEventName.DIFF_APPLICATION_ERROR, TelemetryEventName.SHELL_INTEGRATION_ERROR, diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx index 78ff6b84c9..e2af5c93d4 100644 --- a/webview-ui/src/components/welcome/WelcomeView.tsx +++ b/webview-ui/src/components/welcome/WelcomeView.tsx @@ -5,12 +5,14 @@ import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import posthog from "posthog-js" import type { ProviderSettings } from "@roo-code/types" +import { TelemetryEventName } from "@roo-code/types" import { useExtensionState } from "@src/context/ExtensionStateContext" import { validateApiConfiguration } from "@src/utils/validate" import { vscode } from "@src/utils/vscode" import { useAppTranslation } from "@src/i18n/TranslationContext" import { getRequestyAuthUrl, getOpenRouterAuthUrl } from "@src/oauth/urls" +import { telemetryClient } from "@src/utils/TelemetryClient" import ApiOptions from "../settings/ApiOptions" import { Tab, TabContent } from "../common/Tab" @@ -121,6 +123,11 @@ const WelcomeView = () => { target="_blank" rel="noopener noreferrer" onClick={(e) => { + // 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()