Skip to content

Commit 200d79e

Browse files
In-app announcement for Roo Code Cloud (#7914)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent 3dfa526 commit 200d79e

File tree

21 files changed

+214
-405
lines changed

21 files changed

+214
-405
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class ClineProvider
141141

142142
public isViewLaunched = false
143143
public settingsImportedAt?: number
144-
public readonly latestAnnouncementId = "aug-25-2025-grok-code-fast" // Update for Grok Code Fast announcement
144+
public readonly latestAnnouncementId = "sep-2025-roo-code-cloud" // Roo Code Cloud announcement
145145
public readonly providerSettingsManager: ProviderSettingsManager
146146
public readonly customModesManager: CustomModesManager
147147

webview-ui/src/components/chat/Announcement.tsx

Lines changed: 105 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ import { Package } from "@roo/package"
66
import { useAppTranslation } from "@src/i18n/TranslationContext"
77
import { useExtensionState } from "@src/context/ExtensionStateContext"
88
import { vscode } from "@src/utils/vscode"
9-
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@src/components/ui"
9+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@src/components/ui"
1010
import { Button } from "@src/components/ui"
1111

12+
// Define the production URL constant locally to avoid importing from cloud package in webview
13+
const PRODUCTION_ROO_CODE_API_URL = "https://app.roocode.com"
14+
1215
interface AnnouncementProps {
1316
hideAnnouncement: () => void
1417
}
@@ -25,7 +28,8 @@ interface AnnouncementProps {
2528
const Announcement = ({ hideAnnouncement }: AnnouncementProps) => {
2629
const { t } = useAppTranslation()
2730
const [open, setOpen] = useState(true)
28-
const { cloudIsAuthenticated } = useExtensionState()
31+
const { cloudApiUrl } = useExtensionState()
32+
const cloudUrl = cloudApiUrl || PRODUCTION_ROO_CODE_API_URL
2933

3034
return (
3135
<Dialog
@@ -40,100 +44,126 @@ const Announcement = ({ hideAnnouncement }: AnnouncementProps) => {
4044
<DialogContent className="max-w-96">
4145
<DialogHeader>
4246
<DialogTitle>{t("chat:announcement.title", { version: Package.version })}</DialogTitle>
47+
<DialogDescription>
48+
<Trans
49+
i18nKey="chat:announcement.description"
50+
components={{
51+
bold: <b />,
52+
}}
53+
/>
54+
</DialogDescription>
4355
</DialogHeader>
4456
<div>
45-
<div className="space-y-2">
46-
<div>
57+
<ul className="space-y-2">
58+
<li>
59+
{" "}
4760
<Trans
48-
i18nKey="chat:announcement.stealthModel.feature"
61+
i18nKey="chat:announcement.feature1"
4962
components={{
5063
bold: <b />,
51-
code: <code className="px-1 py-0.5 bg-gray-100 dark:bg-gray-800 rounded" />,
5264
}}
5365
/>
54-
</div>
55-
</div>
66+
</li>
67+
<li>
68+
{" "}
69+
<Trans
70+
i18nKey="chat:announcement.feature2"
71+
components={{
72+
bold: <b />,
73+
}}
74+
/>
75+
</li>
76+
</ul>
5677

5778
<div className="mt-4">
5879
<Trans
59-
i18nKey="chat:announcement.stealthModel.note"
80+
i18nKey="chat:announcement.learnMore"
6081
components={{
61-
bold: <b />,
62-
code: <code className="px-1 py-0.5 bg-gray-100 dark:bg-gray-800 rounded" />,
82+
learnMoreLink: (
83+
<VSCodeLink
84+
href="https://docs.roocode.com/update-notes/v3.28.0#task-sync--roomote-control"
85+
onClick={(e) => {
86+
e.preventDefault()
87+
window.postMessage(
88+
{
89+
type: "action",
90+
action: "openExternal",
91+
data: {
92+
url: "https://docs.roocode.com/update-notes/v3.28.0#task-sync--roomote-control",
93+
},
94+
},
95+
"*",
96+
)
97+
}}
98+
/>
99+
),
63100
}}
64101
/>
65102
</div>
66103

67104
<div className="mt-4">
68-
{!cloudIsAuthenticated ? (
69-
<div className="space-y-3">
70-
<div className="text-sm w-full">
71-
<Trans
72-
i18nKey="chat:announcement.stealthModel.selectModel"
73-
components={{
74-
code: <code className="px-1 py-0.5 bg-gray-100 dark:bg-gray-800 rounded" />,
75-
settingsLink: (
76-
<VSCodeLink
77-
href="#"
78-
onClick={(e) => {
79-
e.preventDefault()
80-
setOpen(false)
81-
hideAnnouncement()
82-
window.postMessage(
83-
{
84-
type: "action",
85-
action: "settingsButtonClicked",
86-
values: { section: "provider" },
87-
},
88-
"*",
89-
)
90-
}}
91-
/>
92-
),
93-
}}
94-
/>
95-
</div>
96-
<Button
97-
onClick={() => {
98-
vscode.postMessage({ type: "rooCloudSignIn" })
99-
}}
100-
className="w-full">
101-
{t("chat:announcement.stealthModel.connectButton")}
102-
</Button>
103-
</div>
104-
) : (
105-
<div className="text-sm w-full">
106-
<Trans
107-
i18nKey="chat:announcement.stealthModel.selectModel"
108-
components={{
109-
code: <code className="px-1 py-0.5 bg-gray-100 dark:bg-gray-800 rounded" />,
110-
settingsLink: (
111-
<VSCodeLink
112-
href="#"
113-
onClick={(e) => {
114-
e.preventDefault()
115-
setOpen(false)
116-
hideAnnouncement()
117-
window.postMessage(
118-
{
119-
type: "action",
120-
action: "settingsButtonClicked",
121-
values: { section: "provider" },
122-
},
123-
"*",
124-
)
125-
}}
126-
/>
127-
),
128-
}}
129-
/>
130-
</div>
131-
)}
105+
<Button
106+
onClick={() => {
107+
vscode.postMessage({ type: "openExternal", url: cloudUrl })
108+
}}
109+
className="w-full">
110+
{t("chat:announcement.visitCloudButton")}
111+
</Button>
112+
</div>
113+
114+
<div className="mt-4 text-sm text-center">
115+
<Trans
116+
i18nKey="chat:announcement.socialLinks"
117+
components={{
118+
xLink: <XLink />,
119+
discordLink: <DiscordLink />,
120+
redditLink: <RedditLink />,
121+
}}
122+
/>
132123
</div>
133124
</div>
134125
</DialogContent>
135126
</Dialog>
136127
)
137128
}
138129

130+
const XLink = () => (
131+
<VSCodeLink
132+
href="https://x.com/roo_code"
133+
onClick={(e) => {
134+
e.preventDefault()
135+
window.postMessage({ type: "action", action: "openExternal", data: { url: "https://x.com/roo_code" } }, "*")
136+
}}>
137+
X
138+
</VSCodeLink>
139+
)
140+
141+
const DiscordLink = () => (
142+
<VSCodeLink
143+
href="https://discord.gg/rCQcvT7Fnt"
144+
onClick={(e) => {
145+
e.preventDefault()
146+
window.postMessage(
147+
{ type: "action", action: "openExternal", data: { url: "https://discord.gg/rCQcvT7Fnt" } },
148+
"*",
149+
)
150+
}}>
151+
Discord
152+
</VSCodeLink>
153+
)
154+
155+
const RedditLink = () => (
156+
<VSCodeLink
157+
href="https://www.reddit.com/r/RooCode/"
158+
onClick={(e) => {
159+
e.preventDefault()
160+
window.postMessage(
161+
{ type: "action", action: "openExternal", data: { url: "https://www.reddit.com/r/RooCode/" } },
162+
"*",
163+
)
164+
}}>
165+
r/RooCode
166+
</VSCodeLink>
167+
)
168+
139169
export default memo(Announcement)

webview-ui/src/components/chat/__tests__/Announcement.spec.tsx

Lines changed: 0 additions & 102 deletions
This file was deleted.

webview-ui/src/i18n/locales/ca/chat.json

Lines changed: 6 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/chat.json

Lines changed: 6 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)