@@ -3127,155 +3127,83 @@ def _save_generated_code(self, command: str):
31273127
31283128
31293129def _show_welcome_screen (console , context , config_manager ):
3130- """Show enhanced welcome screen with colorful ASCII art and feature overview ."""
3130+ """Show simple welcome screen with ASCII art."""
31313131 from rich .align import Align
31323132 from rich .box import DOUBLE
31333133 from rich .panel import Panel
31343134 from rich .text import Text
31353135
31363136 from ..core .version_checker import display_version_info
3137+ from ..ui .welcome import DSPY_ASCII_ART , create_gradient_text
31373138
31383139 console .print ()
31393140
31403141 # Display DSPy version info with warnings if needed
31413142 display_version_info (console , show_warning = True )
31423143 console .print ()
31433144
3144- # Colorful ASCII Art Banner with Gradient (from ui/welcome.py)
3145- DSPY_ASCII_ART = """
3146- ██████╗ ███████╗██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗
3147- ██╔══██╗██╔════╝██╔══██╗╚██╗ ██╔╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝
3148- ██║ ██║███████╗██████╔╝ ╚████╔╝ ██║ ██║ ██║██║ ██║█████╗
3149- ██║ ██║╚════██║██╔═══╝ ╚██╔╝ ██║ ██║ ██║██║ ██║██╔══╝
3150- ██████╔╝███████║██║ ██║ ╚██████╗╚██████╔╝██████╔╝███████╗
3151- ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
3152- """
3153-
3154- # Create gradient colors (rainbow effect)
3145+ # Create beautiful gradient colors for the ASCII art (purple → pink → orange)
3146+ # Using exact RGB colors matching the SVG gradient
31553147 gradient_colors = [
3156- "cyan" ,
3157- "bright_cyan" ,
3158- "blue" ,
3159- "bright_blue" ,
3160- "magenta" ,
3161- "bright_magenta" ,
3162- "red" ,
3163- "bright_red" ,
3164- "yellow" ,
3165- "bright_yellow" ,
3148+ (217 , 70 , 239 ), # #d946ef - Deep purple - "DSPY" starts here
3149+ (217 , 70 , 239 ), # #d946ef - Purple
3150+ (192 , 38 , 211 ), # #c026d3 - Purple
3151+ (168 , 85 , 247 ), # #a855f7 - Bright purple
3152+ (168 , 85 , 247 ), # #a855f7 - Purple transitioning to pink
3153+ (236 , 72 , 153 ), # #ec4899 - Pink
3154+ (236 , 72 , 153 ), # #ec4899 - Bright pink - middle section
3155+ (244 , 63 , 94 ), # #f43f5e - Pink
3156+ (244 , 63 , 94 ), # #f43f5e - Pink transitioning to orange
3157+ (251 , 146 , 60 ), # #fb923c - Orange - "CODE" section
3158+ (251 , 146 , 60 ), # #fb923c - Bright orange
3159+ (251 , 146 , 60 ), # #fb923c - Orange end
31663160 ]
31673161
3168- # Apply gradient to ASCII art
3169- ascii_text = Text ()
3170- all_chars = [c for c in DSPY_ASCII_ART if c not in ("\n " , " " )]
3171- total_chars = len (all_chars )
3172- char_index = 0
3173-
3174- for char in DSPY_ASCII_ART :
3175- if char == "\n " :
3176- ascii_text .append ("\n " )
3177- elif char == " " :
3178- ascii_text .append (" " )
3179- else :
3180- position = char_index / max (total_chars - 1 , 1 )
3181- color_float = position * (len (gradient_colors ) - 1 )
3182- color_index = int (color_float )
3183- color = gradient_colors [min (color_index , len (gradient_colors ) - 1 )]
3184- ascii_text .append (char , style = f"bold { color } " )
3185- char_index += 1
3186-
3187- # Show colorful ASCII art in a panel
3162+ # Show ASCII art with gradient in a panel
3163+ ascii_text = create_gradient_text (DSPY_ASCII_ART , gradient_colors )
31883164 ascii_panel = Panel (
3189- Align .center (ascii_text ), border_style = "bright_cyan " , box = DOUBLE , padding = (1 , 4 )
3165+ Align .center (ascii_text ), border_style = "bright_magenta " , box = DOUBLE , padding = (1 , 4 )
31903166 )
31913167 console .print (ascii_panel )
31923168
3193- # Colorful subtitle (matching original gradient style)
3194- subtitle = Text ()
3195- subtitle .append ("✨ " , style = "bright_yellow" )
3196- subtitle .append ("Your " , style = "white" )
3197- subtitle .append ("A" , style = "bright_cyan" )
3198- subtitle .append ("I" , style = "bright_blue" )
3199- subtitle .append ("-" , style = "white" )
3200- subtitle .append ("P" , style = "bright_magenta" )
3201- subtitle .append ("o" , style = "bright_red" )
3202- subtitle .append ("w" , style = "bright_yellow" )
3203- subtitle .append ("e" , style = "bright_green" )
3204- subtitle .append ("r" , style = "bright_cyan" )
3205- subtitle .append ("e" , style = "bright_blue" )
3206- subtitle .append ("d" , style = "bright_magenta" )
3207- subtitle .append (" DSPy Development " , style = "white" )
3208- subtitle .append ("A" , style = "bright_red" )
3209- subtitle .append ("s" , style = "bright_yellow" )
3210- subtitle .append ("s" , style = "bright_green" )
3211- subtitle .append ("i" , style = "bright_cyan" )
3212- subtitle .append ("s" , style = "bright_blue" )
3213- subtitle .append ("t" , style = "bright_magenta" )
3214- subtitle .append ("a" , style = "bright_red" )
3215- subtitle .append ("n" , style = "bright_yellow" )
3216- subtitle .append ("t" , style = "bright_green" )
3217- subtitle .append (": " , style = "white" )
3218- subtitle .append ("C" , style = "bright_cyan" )
3219- subtitle .append ("l" , style = "bright_blue" )
3220- subtitle .append ("a" , style = "bright_magenta" )
3221- subtitle .append ("u" , style = "bright_red" )
3222- subtitle .append ("d" , style = "bright_yellow" )
3223- subtitle .append ("e" , style = "bright_green" )
3224- subtitle .append (" " , style = "white" )
3225- subtitle .append ("C" , style = "bright_cyan" )
3226- subtitle .append ("o" , style = "bright_blue" )
3227- subtitle .append ("d" , style = "bright_magenta" )
3228- subtitle .append ("e" , style = "bright_red" )
3229- subtitle .append (" " , style = "white" )
3230- subtitle .append ("f" , style = "bright_yellow" )
3231- subtitle .append ("o" , style = "bright_green" )
3232- subtitle .append ("r" , style = "bright_cyan" )
3233- subtitle .append (" " , style = "white" )
3234- subtitle .append ("D" , style = "bright_blue" )
3235- subtitle .append ("S" , style = "bright_magenta" )
3236- subtitle .append ("P" , style = "bright_red" )
3237- subtitle .append ("y" , style = "bright_yellow" )
3238- subtitle .append (" ✨" , style = "bright_yellow" )
3239- console .print (Align .center (subtitle ))
3169+ # Simple welcome message with purple-pink-orange gradient
3170+ welcome_text = Text ()
3171+ welcome_text .append ("✨ " , style = "bright_magenta" )
3172+ welcome_text .append ("Welcome to " , style = "white" )
3173+ welcome_text .append ("D" , style = "magenta" )
3174+ welcome_text .append ("S" , style = "bright_magenta" )
3175+ welcome_text .append ("P" , style = "red" )
3176+ welcome_text .append ("y" , style = "bright_red" )
3177+ welcome_text .append (" " , style = "white" )
3178+ welcome_text .append ("C" , style = "yellow" )
3179+ welcome_text .append ("o" , style = "bright_yellow" )
3180+ welcome_text .append ("d" , style = "yellow" )
3181+ welcome_text .append ("e" , style = "bright_red" )
3182+ welcome_text .append (" ✨" , style = "bright_magenta" )
3183+
3184+ console .print (Align .center (welcome_text ))
32403185 console .print ()
32413186
3242- # Project Context (if initialized)
3243- if context and context .is_initialized :
3244- console .print (
3245- f"[bold green]📁[/bold green] Project: [bold cyan]{ context .name } [/bold cyan] | Use Case: [yellow]{ context .use_case } [/yellow]"
3246- )
3247- console .print ()
3248-
3249- # Minimal Key Commands
3250- console .print ("[bold yellow]⚡ Get Started:[/bold yellow]" )
3251- console .print ()
3252- console .print (" [cyan]/intro[/cyan] - Complete guide & all features" )
3253- console .print (" [cyan]/init[/cyan] - Initialize your project" )
3254- console .print (" [cyan]/demo[/cyan] - See it in action" )
3255- console .print (" [cyan]/help[/cyan] - View all commands" )
3256- console .print ()
3257- console .print ("[dim]💬 Or just describe what you want to build in natural language![/dim]" )
3258- console .print ()
3259-
3260- # Status tip
3261- if not config_manager .is_project_initialized ():
3262- console .print (
3263- "[yellow]💡[/yellow] New here? Try [cyan]/demo[/cyan] or [cyan]/init[/cyan] to get started"
3264- )
3265- elif not config_manager .config .default_model :
3266- console .print (
3267- "[yellow]💡[/yellow] Tip: Connect a model with [cyan]/connect ollama llama3.1:8b[/cyan]"
3268- )
3187+ # Model info
3188+ model_name = "Not configured"
3189+ if config_manager :
3190+ try :
3191+ config = config_manager .get_config ()
3192+ if config and "model" in config :
3193+ model_name = config .get ("model" , {}).get ("name" , "Not configured" )
3194+ except Exception :
3195+ pass
3196+
3197+ model_info = Text ()
3198+ model_info .append ("🤖 Model: " , style = "dim" )
3199+ model_info .append (
3200+ model_name , style = "bold green" if model_name != "Not configured" else "bold yellow"
3201+ )
3202+ console .print (Align .center (model_info ))
32693203 console .print ()
32703204
3271- # Ready prompt
3272- ready = Text ()
3273- ready .append ("🚀 " , style = "bold" )
3274- ready .append ("Ready! " , style = "bold green" )
3275- ready .append ("New here? Try " , style = "dim" )
3276- ready .append ("/intro" , style = "bold cyan" )
3277- ready .append (" for the complete guide!" , style = "dim" )
3278- console .print (ready )
3205+ # Minimal help
3206+ console .print ("[dim]Type /help for commands or describe what you want to build[/dim]" )
32793207 console .print ()
32803208
32813209
0 commit comments