@@ -395,7 +395,7 @@ def show_response(self, progress: TestProgress, response: ModelResponse) -> None
395395 Text (response_content , style = "white" ),
396396 title = title ,
397397 title_align = "left" ,
398- style = "green " ,
398+ style = "blue " ,
399399 padding = (1 , 2 ),
400400 )
401401 self .console .print (response_panel )
@@ -421,35 +421,43 @@ def show_evaluation(self, progress: TestProgress, evaluation: EvaluationResult)
421421 progress .current_step = "Evaluation complete"
422422 progress .evaluation_done = True
423423
424- # Vulnerability status
425- vuln_status = "🔴 YES" if evaluation .is_vulnerable else "🟢 NO"
426- confidence = f"{ evaluation .confidence :.2f} "
424+ # Build dynamic title with result and confidence
425+ if evaluation .is_vulnerable :
426+ title = f"🔴 Evaluated as VULNERABLE (confidence: { evaluation .confidence :.2f} )"
427+ panel_style = "red"
428+ else :
429+ title = f"✅ Evaluated as NOT vulnerable (confidence: { evaluation .confidence :.2f} )"
430+ panel_style = "green"
427431
428432 if self .console :
429- # Create evaluation table
430- eval_table = Table (show_header = False , box = None , padding = (0 , 1 ))
431- eval_table .add_column ("Field" , style = "cyan bold" )
432- eval_table .add_column ("Value" )
433-
434- eval_table .add_row ("Vulnerable:" , vuln_status )
435- eval_table .add_row ("Confidence:" , confidence )
433+ # Create simplified content - only evidence and reasoning
434+ content_parts = []
436435
437436 if evaluation .evidence :
438437 evidence_text = "\n " .join (f"• { e } " for e in evaluation .evidence )
439- eval_table . add_row ( "Evidence:" , evidence_text )
438+ content_parts . append ( f "Evidence:\n { evidence_text } " )
440439
441440 if evaluation .reasoning :
442- eval_table .add_row ("Reasoning:" , evaluation .reasoning )
441+ content_parts .append (f"Reasoning: { evaluation .reasoning } " )
442+
443+ # If no evidence or reasoning, show a simple message
444+ if not content_parts :
445+ content_parts .append ("No additional details available" )
446+
447+ content = "\n \n " .join (content_parts )
443448
444449 eval_panel = Panel (
445- eval_table , title = "🔍 EVALUATION" , title_align = "left" , style = "blue" , padding = (1 , 2 )
450+ Text (content , style = "white" ),
451+ title = title ,
452+ title_align = "left" ,
453+ style = panel_style ,
454+ padding = (0 , 1 ),
446455 )
447456 self .console .print (eval_panel )
448457
449458 else :
450- print ("\n 🔍 EVALUATION:" )
451- print (f" Vulnerable: { vuln_status } " )
452- print (f" Confidence: { confidence } " )
459+ # Fallback for non-Rich terminals
460+ print (f"\n { title } :" )
453461
454462 if evaluation .evidence :
455463 print (" Evidence:" )
@@ -459,6 +467,9 @@ def show_evaluation(self, progress: TestProgress, evaluation: EvaluationResult)
459467 if evaluation .reasoning :
460468 print (f" Reasoning: { evaluation .reasoning } " )
461469
470+ if not evaluation .evidence and not evaluation .reasoning :
471+ print (" No additional details available" )
472+
462473 def complete_test (self , progress : TestProgress , evaluation : EvaluationResult ) -> None :
463474 """Mark test as complete"""
464475 total_time = time .time () - progress .start_time
@@ -607,6 +618,9 @@ def show_vulnerability_summary(self, test_id: str, repetitions: list[dict[str, A
607618
608619 vulnerability_rate = (vulnerable_runs / total_runs ) * 100
609620
621+ # Dynamic color based on vulnerability results
622+ summary_style = "red" if vulnerable_runs > 0 else "green"
623+
610624 if self .console :
611625 summary_table = Table (show_header = False , box = None , padding = (0 , 1 ))
612626 summary_table .add_column ("Field" , style = "cyan bold" )
@@ -623,7 +637,7 @@ def show_vulnerability_summary(self, test_id: str, repetitions: list[dict[str, A
623637 summary_table ,
624638 title = f"📊 Vulnerability Summary for { test_id } " ,
625639 title_align = "left" ,
626- style = "blue" ,
640+ style = summary_style ,
627641 padding = (1 , 2 ),
628642 )
629643 self .console .print (summary_panel )
0 commit comments