@@ -169,7 +169,7 @@ pub struct App {
169
169
autocomplete_index : usize ,
170
170
ruixen_reaction_state : Option < RuixenState > , // Temporary reaction state
171
171
reaction_timer : Option < std:: time:: Instant > , // When reaction started
172
- last_api_call : Option < std:: time:: Instant > , // Rate limiting protection
172
+ last_api_call : Option < std:: time:: Instant > , // Rate limiting protection
173
173
}
174
174
175
175
impl App {
@@ -515,10 +515,13 @@ impl App {
515
515
modal_height,
516
516
) ;
517
517
// Add subtle backdrop darkening for better modal focus
518
- let backdrop = Block :: default ( )
519
- . style ( self . theme . ratatui_style ( Element :: Background ) . bg ( ratatui:: style:: Color :: Rgb ( 20 , 20 , 20 ) ) ) ;
518
+ let backdrop = Block :: default ( ) . style (
519
+ self . theme
520
+ . ratatui_style ( Element :: Background )
521
+ . bg ( ratatui:: style:: Color :: Rgb ( 20 , 20 , 20 ) ) ,
522
+ ) ;
520
523
frame. render_widget ( backdrop, size) ;
521
-
524
+
522
525
frame. render_widget ( Clear , modal_area) ; // clears the background
523
526
524
527
if self . mode == AppMode :: SelectingLocalModel {
@@ -580,10 +583,13 @@ impl App {
580
583
modal_height,
581
584
) ;
582
585
// Add subtle backdrop darkening for better modal focus
583
- let backdrop = Block :: default ( )
584
- . style ( self . theme . ratatui_style ( Element :: Background ) . bg ( ratatui:: style:: Color :: Rgb ( 20 , 20 , 20 ) ) ) ;
586
+ let backdrop = Block :: default ( ) . style (
587
+ self . theme
588
+ . ratatui_style ( Element :: Background )
589
+ . bg ( ratatui:: style:: Color :: Rgb ( 20 , 20 , 20 ) ) ,
590
+ ) ;
585
591
frame. render_widget ( backdrop, size) ;
586
-
592
+
587
593
frame. render_widget ( Clear , modal_area) ;
588
594
self . render_synthesize_modal ( frame, modal_area) ;
589
595
} else if self . mode == AppMode :: CoachingTip {
@@ -602,10 +608,13 @@ impl App {
602
608
modal_height,
603
609
) ;
604
610
// Add subtle backdrop darkening for better modal focus
605
- let backdrop = Block :: default ( )
606
- . style ( self . theme . ratatui_style ( Element :: Background ) . bg ( ratatui:: style:: Color :: Rgb ( 20 , 20 , 20 ) ) ) ;
611
+ let backdrop = Block :: default ( ) . style (
612
+ self . theme
613
+ . ratatui_style ( Element :: Background )
614
+ . bg ( ratatui:: style:: Color :: Rgb ( 20 , 20 , 20 ) ) ,
615
+ ) ;
607
616
frame. render_widget ( backdrop, size) ;
608
-
617
+
609
618
frame. render_widget ( Clear , modal_area) ;
610
619
self . render_coaching_tip_modal ( frame, modal_area) ;
611
620
} else if self . mode == AppMode :: Complete {
@@ -1094,8 +1103,11 @@ impl App {
1094
1103
// Synthesize - send proposal to cloud for synthesis
1095
1104
// Rate limiting: only allow if not already processing and sufficient cooldown
1096
1105
let can_make_request = self . agent_status != AgentStatus :: Searching
1097
- && self . last_api_call . map ( |t| t. elapsed ( ) . as_secs ( ) >= 2 ) . unwrap_or ( true ) ;
1098
-
1106
+ && self
1107
+ . last_api_call
1108
+ . map ( |t| t. elapsed ( ) . as_secs ( ) >= 2 )
1109
+ . unwrap_or ( true ) ;
1110
+
1099
1111
if can_make_request {
1100
1112
if let Some ( proposal) =
1101
1113
self . proposals . get ( self . current_proposal_index )
0 commit comments