@@ -3,10 +3,10 @@ import { useDeepCompareEffect, useEvent, useMount } from "react-use"
33import debounce from "debounce"
44import { Virtuoso , type VirtuosoHandle } from "react-virtuoso"
55import removeMd from "remove-markdown"
6- import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
6+ import { VSCodeButton , VSCodeLink } from "@vscode/webview-ui-toolkit/react"
77import useSound from "use-sound"
88import { LRUCache } from "lru-cache"
9- import { useTranslation } from "react-i18next"
9+ import { Trans , useTranslation } from "react-i18next"
1010
1111import { useDebounceEffect } from "@src/utils/useDebounceEffect"
1212import { appendImages } from "@src/utils/imageUtils"
@@ -37,10 +37,10 @@ import { useExtensionState } from "@src/context/ExtensionStateContext"
3737import { useSelectedModel } from "@src/components/ui/hooks/useSelectedModel"
3838import RooHero from "@src/components/welcome/RooHero"
3939import RooTips from "@src/components/welcome/RooTips"
40- import RooCloudCTA from "@src/components/welcome/RooCloudCTA"
4140import { StandardTooltip } from "@src/components/ui"
4241import { useAutoApprovalState } from "@src/hooks/useAutoApprovalState"
4342import { useAutoApprovalToggles } from "@src/hooks/useAutoApprovalToggles"
43+ import { CloudUpsellDialog } from "@src/components/cloud/CloudUpsellDialog"
4444
4545import TelemetryBanner from "../common/TelemetryBanner"
4646import VersionIndicator from "../common/VersionIndicator"
@@ -56,6 +56,9 @@ import SystemPromptWarning from "./SystemPromptWarning"
5656import ProfileViolationWarning from "./ProfileViolationWarning"
5757import { CheckpointWarning } from "./CheckpointWarning"
5858import { QueuedMessages } from "./QueuedMessages"
59+ import DismissibleUpsell from "../common/DismissibleUpsell"
60+ import { useCloudUpsell } from "@src/hooks/useCloudUpsell"
61+ import { Cloud } from "lucide-react"
5962
6063export interface ChatViewProps {
6164 isHidden : boolean
@@ -208,6 +211,15 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
208211 clineAskRef . current = clineAsk
209212 } , [ clineAsk ] )
210213
214+ const {
215+ isOpen : isUpsellOpen ,
216+ openUpsell,
217+ closeUpsell,
218+ handleConnect,
219+ } = useCloudUpsell ( {
220+ autoOpenOnAuth : false ,
221+ } )
222+
211223 // Keep inputValueRef in sync with inputValue state
212224 useEffect ( ( ) => {
213225 inputValueRef . current = inputValue
@@ -1831,7 +1843,25 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
18311843 { telemetrySetting === "unset" && < TelemetryBanner /> }
18321844
18331845 < div className = "mb-2.5" >
1834- { cloudIsAuthenticated || taskHistory . length < 4 ? < RooTips /> : < RooCloudCTA /> }
1846+ { cloudIsAuthenticated || taskHistory . length < 4 ? (
1847+ < RooTips />
1848+ ) : (
1849+ < >
1850+ < DismissibleUpsell
1851+ upsellId = "taskList"
1852+ icon = { < Cloud className = "size-4 mt-0.5 shrink-0" /> }
1853+ onClick = { ( ) => openUpsell ( ) }
1854+ dismissOnClick = { false }
1855+ className = "bg-vscode-editor-background p-4 !text-base" >
1856+ < Trans
1857+ i18nKey = "cloud:upsell.taskList"
1858+ components = { {
1859+ learnMoreLink : < VSCodeLink href = "#" /> ,
1860+ } }
1861+ />
1862+ </ DismissibleUpsell >
1863+ </ >
1864+ ) }
18351865 </ div >
18361866 { /* Show the task history preview if expanded and tasks exist */ }
18371867 { taskHistory . length > 0 && isExpanded && < HistoryPreview /> }
@@ -2013,6 +2043,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
20132043 ) }
20142044
20152045 < div id = "roo-portal" />
2046+ < CloudUpsellDialog open = { isUpsellOpen } onOpenChange = { closeUpsell } onConnect = { handleConnect } />
20162047 </ div >
20172048 )
20182049}
0 commit comments