Fixes #5284: Move version badge to welcome screen only

- Created VersionIndicator component that only displays on welcome screen
- Positioned version badge in top-right corner when no task is active
- Prevents version badge from overlapping with task UI elements
- Resolves issue where version badge appeared during task execution
This commit is contained in:
Roo Code 2025-06-30 16:59:31 +00:00
parent 3a8ba27615
commit 8bd1bb4bcc
2 changed files with 28 additions and 1 deletions

View file

@ -44,6 +44,7 @@ import AutoApproveMenu from "./AutoApproveMenu"
import SystemPromptWarning from "./SystemPromptWarning"
import ProfileViolationWarning from "./ProfileViolationWarning"
import { CheckpointWarning } from "./CheckpointWarning"
import VersionIndicator from "../common/VersionIndicator"
export interface ChatViewProps {
isHidden: boolean
@ -1409,7 +1410,14 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
</div>
)}
<div
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`}>
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 relative`}>
<VersionIndicator
onClick={() => {
// Handle version indicator click - could show announcement modal or version info
console.log("Version indicator clicked")
}}
className="absolute top-2 right-3 z-10"
/>
<RooHero />
{telemetrySetting === "unset" && <TelemetryBanner />}
{/* Show the task history preview if expanded and tasks exist */}

View file

@ -0,0 +1,19 @@
import { Package } from "@roo/package"
interface VersionIndicatorProps {
onClick?: () => void
className?: string
}
const VersionIndicator = ({ onClick, className }: VersionIndicatorProps) => {
return (
<div
className={`text-xs text-vscode-descriptionForeground cursor-pointer hover:text-vscode-foreground transition-colors ${className || ""}`}
onClick={onClick}
title={`Roo Code v${Package.version}`}>
v{Package.version}
</div>
)
}
export default VersionIndicator