@@ -2,7 +2,7 @@ use crate::api::{AnthropicClient, ContentBlock, CreateMessageRequest, MorphClien
22use crate :: conversation:: ConversationHistory ;
33use crate :: error:: { Result , SofosError } ;
44use crate :: tools:: { add_code_search_tool, get_tools, get_tools_with_morph, ToolExecutor } ;
5- use colored:: Colorize ;
5+ use colored:: { Colorize } ;
66use rustyline:: error:: ReadlineError ;
77use rustyline:: DefaultEditor ;
88use std:: path:: PathBuf ;
@@ -313,7 +313,7 @@ impl Repl {
313313 let mut frame_idx = 0 ;
314314
315315 while thinking_clone. load ( Ordering :: Relaxed ) {
316- print ! ( "\r {} {}" , frames[ frame_idx] . bright_cyan ( ) , "Thinking..." . bright_cyan ( ) ) ;
316+ print ! ( "\r {} {}" , frames[ frame_idx] . truecolor ( 0xFF , 0x99 , 0x33 ) , "Thinking..." . truecolor ( 0xFF , 0x99 , 0x33 ) ) ;
317317 let _ = io:: stdout ( ) . flush ( ) ;
318318 frame_idx = ( frame_idx + 1 ) % frames. len ( ) ;
319319 thread:: sleep ( Duration :: from_millis ( 80 ) ) ;
@@ -350,13 +350,17 @@ impl Repl {
350350 Ok ( resp) => {
351351 // Stop animation
352352 thinking. store ( false , Ordering :: Relaxed ) ;
353- let _ = animation_handle. join ( ) ;
353+ if let Err ( e) = animation_handle. join ( ) {
354+ eprintln ! ( "{} Animation thread panicked: {:?}" , "Warning:" . bright_yellow( ) . bold( ) , e) ;
355+ }
354356 resp
355357 } ,
356358 Err ( e) => {
357359 // Stop animation on error
358360 thinking. store ( false , Ordering :: Relaxed ) ;
359- let _ = animation_handle. join ( ) ;
361+ if let Err ( panic_err) = animation_handle. join ( ) {
362+ eprintln ! ( "{} Animation thread panicked: {:?}" , "Warning:" . bright_yellow( ) . bold( ) , panic_err) ;
363+ }
360364 eprintln ! ( "{} Failed to get response after tool execution: {}" , "Error:" . bright_red( ) . bold( ) , e) ;
361365 return Err ( e) ;
362366 }
0 commit comments