11import React , { useEffect , useState } from "react" ;
22import { useTranslation } from "react-i18next" ;
33import styled , { keyframes } from "styled-components" ;
4- import {
5- WelcomeHero ,
6- WelcomeLogo ,
7- WelcomeSubtitle as OnboardingSubtitle ,
8- FeatureList ,
9- FeatureItem ,
10- FeatureIcon ,
11- FeatureText ,
12- } from "./onboarding/styles" ;
13- import {
14- CodeBuddyLogo ,
15- ChatBubbleIcon ,
16- SearchIcon ,
17- LockIcon ,
18- GlobeIcon ,
19- WrenchIcon ,
20- RefreshIcon ,
21- } from "./onboarding/icons" ;
4+ import { WelcomeHero , WelcomeLogo } from "./onboarding/styles" ;
5+ import { CodeBuddyLogo } from "./onboarding/icons" ;
6+ import { useOnboardingStore } from "../stores/onboarding.store" ;
227
238interface WelcomeScreenProps {
249 username ?: string ;
@@ -55,9 +40,37 @@ const GreetingTitle = styled.h1`
5540 text-align: center;
5641` ;
5742
43+ const Tagline = styled . p `
44+ font-size: 13px;
45+ color: var(--vscode-descriptionForeground, #999);
46+ margin: 0 0 24px 0;
47+ text-align: center;
48+ max-width: 380px;
49+ line-height: 1.5;
50+ ` ;
51+
52+ const SetupCTA = styled . button `
53+ background: var(--vscode-button-background);
54+ color: var(--vscode-button-foreground);
55+ border: none;
56+ border-radius: 6px;
57+ padding: 8px 20px;
58+ font-size: 13px;
59+ font-weight: 500;
60+ cursor: pointer;
61+ transition: background 0.15s ease;
62+
63+ &:hover {
64+ background: var(--vscode-button-hoverBackground);
65+ }
66+ ` ;
67+
5868export const WelcomeScreen : React . FC < WelcomeScreenProps > = ( { username } ) => {
5969 const { t } = useTranslation ( ) ;
6070 const [ displayedText , setDisplayedText ] = useState ( "" ) ;
71+ const isCompleted = useOnboardingStore ( ( s ) => s . isCompleted ) ;
72+ const show = useOnboardingStore ( ( s ) => s . show ) ;
73+
6174 const greeting = username
6275 ? t ( "welcome.greetingWithName" , { username } )
6376 : t ( "welcome.greetingDefault" ) ;
@@ -83,53 +96,12 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = ({ username }) => {
8396 < CodeBuddyLogo />
8497 </ WelcomeLogo >
8598 < GreetingTitle > { displayedText } </ GreetingTitle >
86- < OnboardingSubtitle >
87- { t ( "welcome.subtitle" ) }
88- </ OnboardingSubtitle >
89- < FeatureList >
90- < FeatureItem >
91- < FeatureIcon > < ChatBubbleIcon /> </ FeatureIcon >
92- < FeatureText >
93- < strong > { t ( "welcome.featureAgentMode" ) } </ strong >
94- { t ( "welcome.featureAgentModeDesc" ) }
95- </ FeatureText >
96- </ FeatureItem >
97- < FeatureItem >
98- < FeatureIcon > < SearchIcon /> </ FeatureIcon >
99- < FeatureText >
100- < strong > { t ( "welcome.featureAskMode" ) } </ strong >
101- { t ( "welcome.featureAskModeDesc" ) }
102- </ FeatureText >
103- </ FeatureItem >
104- < FeatureItem >
105- < FeatureIcon > < GlobeIcon /> </ FeatureIcon >
106- < FeatureText >
107- < strong > { t ( "welcome.featureProviders" ) } </ strong >
108- { t ( "welcome.featureProvidersDesc" ) }
109- </ FeatureText >
110- </ FeatureItem >
111- < FeatureItem >
112- < FeatureIcon > < LockIcon /> </ FeatureIcon >
113- < FeatureText >
114- < strong > { t ( "welcome.featureDiffReview" ) } </ strong >
115- { t ( "welcome.featureDiffReviewDesc" ) }
116- </ FeatureText >
117- </ FeatureItem >
118- < FeatureItem >
119- < FeatureIcon > < WrenchIcon /> </ FeatureIcon >
120- < FeatureText >
121- < strong > { t ( "welcome.featureMCP" ) } </ strong >
122- { t ( "welcome.featureMCPDesc" ) }
123- </ FeatureText >
124- </ FeatureItem >
125- < FeatureItem >
126- < FeatureIcon > < RefreshIcon /> </ FeatureIcon >
127- < FeatureText >
128- < strong > { t ( "welcome.featureMentions" ) } </ strong >
129- { t ( "welcome.featureMentionsDesc" ) }
130- </ FeatureText >
131- </ FeatureItem >
132- </ FeatureList >
99+ < Tagline > { t ( "welcome.subtitle" ) } </ Tagline >
100+ { ! isCompleted && (
101+ < SetupCTA onClick = { show } >
102+ { t ( "welcome.setupCTA" ) }
103+ </ SetupCTA >
104+ ) }
133105 </ WelcomeHero >
134106 </ WelcomeContainer >
135107 ) ;
0 commit comments