@@ -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"
@@ -58,6 +57,7 @@ import { QueuedMessages } from "./QueuedMessages"
5857import DismissibleUpsell from "../common/DismissibleUpsell"
5958import { useCloudUpsell } from "@src/hooks/useCloudUpsell"
6059import { Cloud } from "lucide-react"
60+ import CloudAgents from "../cloud/CloudAgents"
6161
6262export interface ChatViewProps {
6363 isHidden : boolean
@@ -118,10 +118,10 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
118118 customModes,
119119 telemetrySetting,
120120 hasSystemPromptOverride,
121- historyPreviewCollapsed, // Added historyPreviewCollapsed
122121 soundEnabled,
123122 soundVolume,
124123 cloudIsAuthenticated,
124+ cloudApiUrl,
125125 messageQueue = [ ] ,
126126 } = useExtensionState ( )
127127
@@ -131,20 +131,6 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
131131 messagesRef . current = messages
132132 } , [ messages ] )
133133
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-
148134 // Leaving this less safe version here since if the first message is not a
149135 // task, then the extension is in a bad state and needs to be debugged (see
150136 // Cline.abort).
@@ -1817,53 +1803,41 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
18171803 ) }
18181804 </ >
18191805 ) : (
1820- < div className = "flex-1 min-h-0 overflow-y-auto flex flex-col gap-4 relative" >
1821- { /* Moved Task Bar Header Here */ }
1822- { tasks . length !== 0 && (
1823- < div className = "flex text-vscode-descriptionForeground w-full mx-auto px-5 pt-3" >
1824- < div className = "flex items-center gap-1 cursor-pointer" onClick = { toggleExpanded } >
1825- { tasks . length < 10 && (
1826- < span className = { `font-medium text-xs ` } > { t ( "history:recentTasks" ) } </ span >
1827- ) }
1828- < span
1829- className = { `codicon ${ isExpanded ? "codicon-eye" : "codicon-eye-closed" } scale-90` }
1830- />
1831- </ div >
1832- </ div >
1833- ) }
1834- < div
1835- 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` } >
1836- { /* Version indicator in top-right corner - only on welcome screen */ }
1806+ < div className = "flex flex-col h-full justify-center p-6 min-h-0 overflow-y-auto gap-4 relative" >
1807+ < div className = "flex flex-col items-start gap-2 justify-center max-w-md h-full" >
18371808 < VersionIndicator
18381809 onClick = { ( ) => setShowAnnouncementModal ( true ) }
18391810 className = "absolute top-2 right-3 z-10"
18401811 />
18411812
1842- < RooHero />
1813+ < div className = "flex flex-col gap-4" >
1814+ < RooHero />
18431815
1844- < div className = "mb-2.5" >
1845- { cloudIsAuthenticated || taskHistory . length < 4 ? (
1846- < RooTips />
1847- ) : (
1848- < >
1849- < DismissibleUpsell
1850- upsellId = "taskList"
1851- icon = { < Cloud className = "size-4 mt-0.5 shrink-0" /> }
1852- onClick = { ( ) => openUpsell ( ) }
1853- dismissOnClick = { false }
1854- className = "bg-vscode-editor-background p-4 !text-base" >
1855- < Trans
1856- i18nKey = "cloud:upsell.taskList"
1857- components = { {
1858- learnMoreLink : < VSCodeLink href = "#" /> ,
1859- } }
1860- />
1861- </ DismissibleUpsell >
1862- </ >
1863- ) }
1816+ { taskHistory . length < 4 && < RooTips /> }
1817+
1818+ { taskHistory . length > 0 && < HistoryPreview /> }
18641819 </ div >
1865- { /* Show the task history preview if expanded and tasks exist */ }
1866- { taskHistory . length > 0 && isExpanded && < HistoryPreview /> }
1820+
1821+ { ! cloudIsAuthenticated ? (
1822+ < DismissibleUpsell
1823+ upsellId = "taskList"
1824+ icon = { < Cloud className = "size-5 mt-0.5 shrink-0" /> }
1825+ onClick = { ( ) => openUpsell ( ) }
1826+ dismissOnClick = { false }
1827+ className = "!bg-vscode-editor-background mt-6 border-border rounded-xl pl-4 pr-3 py-3 !text-base" >
1828+ < Trans
1829+ i18nKey = "cloud:upsell.taskList"
1830+ components = { {
1831+ learnMoreLink : < VSCodeLink href = "#" /> ,
1832+ } }
1833+ />
1834+ </ DismissibleUpsell >
1835+ ) : (
1836+ < CloudAgents
1837+ cloudApiUrl = { cloudApiUrl }
1838+ sessionToken = { undefined } // Will use mock data for now
1839+ />
1840+ ) }
18671841 </ div >
18681842 </ div >
18691843 ) }
@@ -1989,6 +1963,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
19891963 }
19901964 } }
19911965 />
1966+
19921967 < ChatTextArea
19931968 ref = { textAreaRef }
19941969 inputValue = { inputValue }
0 commit comments