@@ -12,10 +12,49 @@ import { showModal } from '../ui/ink/components/Modal.js';
1212import packageJson from '../../package.json' with { type : 'json' } ;
1313import type { LoadedConfig } from '../types.js' ;
1414
15- const AUTOHAND_LOGO = [
16- ' ◎ ◎ ◎ ◎ ▄▀█ █ █ ▀█▀ █▀█ █ █ ▄▀█ █▄ █ █▀▄ ▄▀█ █' ,
17- ' ◎ ◎ ◎ ◎ █▀█ █▄█ █ █▄█ █▀█ █▀█ █ ▀█ █▄▀ █▀█ █' ,
18- ] . join ( '\n' ) ;
15+ // Large FIGlet ASCII art — circles on left (lines 1-2), "Autohand Code" fills all lines
16+ const LOGO_LINES = [
17+ '◎ ◎ ◎ ◎ ___ __ __ __ ______ __' ,
18+ '◎ ◎ ◎ ◎ / | __ __/ /_____ / /_ ____ _____ ____/ / / ____/___ ____/ /__' ,
19+ ' / /| |/ / / / __/ __ \\/ __ \\/ __ `/ __ \\/ __ / / / / __ \\/ __ / _ \\' ,
20+ ' / ___ / /_/ / /_/ /_/ / / / / /_/ / / / / /_/ / / /___/ /_/ / /_/ / __/' ,
21+ ' /_/ |_\\__,_/\\__/\\____/_/ /_/\\__,_/_/ /_/\\__,_/ \\____/\\____/\\__,_/\\___/' ,
22+ ] ;
23+
24+ /**
25+ * Typewriter: circles appear column by column on both rows,
26+ * then the full FIGlet text reveals line by line.
27+ */
28+ async function typewriteWelcome ( startRow : number ) : Promise < void > {
29+ const hide = '\x1b[?25l' ;
30+ const show = '\x1b[?25h' ;
31+ const moveTo = ( r : number , c : number ) => `\x1b[${ r } ;${ c } H` ;
32+
33+ process . stdout . write ( hide ) ;
34+
35+ // Phase 1: Type circles column by column (both rows at once)
36+ for ( let col = 0 ; col < 4 ; col ++ ) {
37+ const x = 1 + col * 2 ; // column position (◎ + space = 2 chars)
38+ process . stdout . write ( moveTo ( startRow , x ) + chalk . white ( '◎' ) ) ;
39+ process . stdout . write ( moveTo ( startRow + 1 , x ) + chalk . white ( '◎' ) ) ;
40+ await new Promise ( r => setTimeout ( r , 100 ) ) ;
41+ }
42+
43+ await new Promise ( r => setTimeout ( r , 150 ) ) ;
44+
45+ // Phase 2: Reveal the text portion of each line
46+ for ( let i = 0 ; i < LOGO_LINES . length ; i ++ ) {
47+ const line = LOGO_LINES [ i ] ;
48+ // For circle lines (0,1), only write the text part after the circles
49+ const textStart = i < 2 ? 9 : 0 ; // circles take 9 chars "◎ ◎ ◎ ◎ "
50+ const text = i < 2 ? line . slice ( textStart ) : line ;
51+ const col = i < 2 ? 10 : 1 ;
52+ process . stdout . write ( moveTo ( startRow + i , col ) + chalk . white ( text ) ) ;
53+ await new Promise ( r => setTimeout ( r , 60 ) ) ;
54+ }
55+
56+ process . stdout . write ( show ) ;
57+ }
1958
2059/**
2160 * Ensure the user is authenticated before proceeding.
@@ -109,19 +148,23 @@ async function promptLogin(config: LoadedConfig): Promise<LoadedConfig> {
109148 // Clear screen and position content vertically centered
110149 process . stdout . write ( '\x1b[2J\x1b[H' ) ;
111150
112- // The art block: logo + tagline + version + prompt = ~8 lines
113- const contentHeight = 8 ;
151+ // Layout: logo (5 lines) + blank + version + blank + modal (~12 lines)
152+ const logoHeight = LOGO_LINES . length ;
153+ const contentHeight = logoHeight + 6 ;
114154 const topPadding = Math . max ( 0 , Math . floor ( ( rows - contentHeight ) / 2 ) ) ;
155+ const logoRow = topPadding + 1 ; // 1-based terminal row
156+
157+ // Typewriter the circles, then reveal the FIGlet text
158+ await typewriteWelcome ( logoRow ) ;
115159
116- process . stdout . write ( '\n' . repeat ( topPadding ) ) ;
117- console . log ( chalk . white ( AUTOHAND_LOGO ) ) ;
160+ // Position cursor below the logo for version + modal
161+ process . stdout . write ( `\x1b[ ${ logoRow + logoHeight } ;1H` ) ;
118162 console . log ( ) ;
119- console . log ( chalk . gray ( ' Your AI-powered coding agent for the terminal' ) ) ;
120- console . log ( chalk . gray ( ` ${ version } ` ) ) ;
163+ console . log ( chalk . gray ( ` ${ version } ` ) ) ;
121164 console . log ( ) ;
122165
123166 const selected = await showModal ( {
124- title : chalk . white ( 'Please sign in to continue.' ) ,
167+ title : chalk . white ( 'Sign in to continue.' ) ,
125168 options : [
126169 { label : 'Login' , value : 'login' } ,
127170 { label : 'Exit' , value : 'exit' } ,
0 commit comments