@@ -44,7 +44,6 @@ import { CloudUpsellDialog } from "@src/components/cloud/CloudUpsellDialog"
4444
4545import TelemetryBanner from "../common/TelemetryBanner"
4646import VersionIndicator from "../common/VersionIndicator"
47- import { useTaskSearch } from "../history/useTaskSearch"
4847import HistoryPreview from "../history/HistoryPreview"
4948import Announcement from "./Announcement"
5049import BrowserSessionRow from "./BrowserSessionRow"
@@ -118,7 +117,6 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
118117 customModes,
119118 telemetrySetting,
120119 hasSystemPromptOverride,
121- historyPreviewCollapsed, // Added historyPreviewCollapsed
122120 soundEnabled,
123121 soundVolume,
124122 cloudIsAuthenticated,
@@ -131,20 +129,6 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
131129 messagesRef . current = messages
132130 } , [ messages ] )
133131
134- const { tasks } = useTaskSearch ( )
135-
136- // Initialize expanded state based on the persisted setting (default to expanded if undefined)
137- const [ isExpanded , setIsExpanded ] = useState (
138- historyPreviewCollapsed === undefined ? true : ! historyPreviewCollapsed ,
139- )
140-
141- const toggleExpanded = useCallback ( ( ) => {
142- const newState = ! isExpanded
143- setIsExpanded ( newState )
144- // Send message to extension to persist the new collapsed state
145- vscode . postMessage ( { type : "setHistoryPreviewCollapsed" , bool : ! newState } )
146- } , [ isExpanded ] )
147-
148132 // Leaving this less safe version here since if the first message is not a
149133 // task, then the extension is in a bad state and needs to be debugged (see
150134 // Cline.abort).
@@ -1810,53 +1794,35 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
18101794 ) }
18111795 </ >
18121796 ) : (
1813- < div className = "flex-1 min-h-0 overflow-y-auto flex flex-col gap-4 relative" >
1814- { /* Moved Task Bar Header Here */ }
1815- { tasks . length !== 0 && (
1816- < div className = "flex text-vscode-descriptionForeground w-full mx-auto px-5 pt-3" >
1817- < div className = "flex items-center gap-1 cursor-pointer" onClick = { toggleExpanded } >
1818- { tasks . length < 10 && (
1819- < span className = { `font-medium text-xs ` } > { t ( "history:recentTasks" ) } </ span >
1820- ) }
1821- < span
1822- className = { `codicon ${ isExpanded ? "codicon-eye" : "codicon-eye-closed" } scale-90` }
1823- />
1824- </ div >
1825- </ div >
1826- ) }
1827- < div
1828- className = { ` w-full flex flex-col gap-4 m-auto ${ isExpanded && tasks . length > 0 ? "mt-0" : "" } px-3.5 min-[370px]:px-10 pt-5 transition-all duration-300` } >
1829- { /* Version indicator in top-right corner - only on welcome screen */ }
1797+ < div className = "flex flex-col h-full justify-center p-6 min-h-0 overflow-y-auto gap-4 relative" >
1798+ < div className = "flex flex-col items-start gap-2 justify-center h-full min-[400px]:px-6" >
18301799 < VersionIndicator
18311800 onClick = { ( ) => setShowAnnouncementModal ( true ) }
18321801 className = "absolute top-2 right-3 z-10"
18331802 />
1834-
1835- < RooHero />
1836-
1837- < div className = "mb-2.5" >
1838- { cloudIsAuthenticated || taskHistory . length < 4 ? (
1839- < RooTips />
1840- ) : (
1841- < >
1842- < DismissibleUpsell
1843- upsellId = "taskList"
1844- icon = { < Cloud className = "size-4 mt-0.5 shrink-0" /> }
1845- onClick = { ( ) => openUpsell ( ) }
1846- dismissOnClick = { false }
1847- className = "bg-vscode-editor-background p-4 !text-base" >
1848- < Trans
1849- i18nKey = "cloud:upsell.taskList"
1850- components = { {
1851- learnMoreLink : < VSCodeLink href = "#" /> ,
1852- } }
1853- />
1854- </ DismissibleUpsell >
1855- </ >
1856- ) }
1803+ < div className = "flex flex-col gap-4 w-full" >
1804+ < RooHero />
1805+ { /* Show RooTips when authenticated or when user is new */ }
1806+ { taskHistory . length < 6 && < RooTips /> }
1807+ { /* Everyone should see their task history if any */ }
1808+ { taskHistory . length > 0 && < HistoryPreview /> }
18571809 </ div >
1858- { /* Show the task history preview if expanded and tasks exist */ }
1859- { taskHistory . length > 0 && isExpanded && < HistoryPreview /> }
1810+ { /* Logged out users should see a one-time upsell, but not for brand new users */ }
1811+ { ! cloudIsAuthenticated && taskHistory . length >= 6 && (
1812+ < DismissibleUpsell
1813+ upsellId = "taskList2"
1814+ icon = { < Cloud className = "size-5 mt-0.5 shrink-0" /> }
1815+ onClick = { ( ) => openUpsell ( ) }
1816+ dismissOnClick = { false }
1817+ className = "!bg-vscode-editor-background mt-6 border-border rounded-xl pl-4 pr-3 py-3 !text-base" >
1818+ < Trans
1819+ i18nKey = "cloud:upsell.taskList"
1820+ components = { {
1821+ learnMoreLink : < VSCodeLink href = "#" /> ,
1822+ } }
1823+ />
1824+ </ DismissibleUpsell >
1825+ ) }
18601826 </ div >
18611827 </ div >
18621828 ) }
0 commit comments