@@ -93,6 +93,7 @@ impl Repl {
9393 println ! ( "{}" , "Type your message or 'exit' to quit." . dimmed( ) ) ;
9494 println ! ( "{}" , "Type 'clear' to clear conversation history." . dimmed( ) ) ;
9595 println ! ( "{}" , "Type 'resume' to load a previous session." . dimmed( ) ) ;
96+ println ! ( "{}" , "Type 'think on/off' to toggle extended thinking." . dimmed( ) ) ;
9697 println ! ( ) ;
9798
9899 loop {
@@ -127,6 +128,32 @@ impl Repl {
127128 }
128129 continue ;
129130 }
131+ "think on" => {
132+ self . enable_thinking = true ;
133+ println ! (
134+ "\n {} (budget: {} tokens)\n " ,
135+ "Extended thinking enabled." . bright_green( ) ,
136+ self . thinking_budget
137+ ) ;
138+ continue ;
139+ }
140+ "think off" => {
141+ self . enable_thinking = false ;
142+ println ! ( "\n {}\n " , "Extended thinking disabled." . bright_yellow( ) ) ;
143+ continue ;
144+ }
145+ "think" => {
146+ if self . enable_thinking {
147+ println ! (
148+ "\n {} (budget: {} tokens)\n " ,
149+ "Extended thinking is enabled" . bright_green( ) ,
150+ self . thinking_budget
151+ ) ;
152+ } else {
153+ println ! ( "\n {}\n " , "Extended thinking is disabled" . bright_yellow( ) ) ;
154+ }
155+ continue ;
156+ }
130157 _ => { }
131158 }
132159
@@ -207,7 +234,7 @@ impl Repl {
207234 let mut frame_idx = 0 ;
208235
209236 // Hide cursor
210- print ! ( "\x1B [?25l" ) ;
237+ print ! ( "\n \ x1B [?25l" ) ;
211238 let _ = io:: stdout ( ) . flush ( ) ;
212239
213240 while awaiting_clone. load ( Ordering :: Relaxed ) {
@@ -355,7 +382,7 @@ impl Repl {
355382 }
356383 ContentBlock :: Thinking { thinking, .. } => {
357384 if !thinking. trim ( ) . is_empty ( ) {
358- println ! ( "{}" , "Thinking:" . truecolor( 0xFF , 0x99 , 0x33 ) . bold( ) ) ;
385+ println ! ( "\n {}" , "Thinking:" . truecolor( 0xFF , 0x99 , 0x33 ) . bold( ) ) ;
359386 println ! ( "{}" , thinking. dimmed( ) ) ;
360387 println ! ( ) ;
361388 }
0 commit comments