diff --git a/chat.js b/chat.js index 82c3dc1..ed348ef 100644 --- a/chat.js +++ b/chat.js @@ -175,7 +175,12 @@ function appendAnalysisReport(report) { if (!historyDiv) return; const classification = report.classification || 'safe'; + const confidence = report.confidence ?? 0; + const threatConfidence = + classification === 'safe' + ? 0 + : confidence; const categories = { phishing: '🎣 Phishing / Credential Theft', fake_job: '💼 Fake Job Offer', @@ -197,10 +202,10 @@ function appendAnalysisReport(report) {
Threat Confidence - ${report.confidence || 0}% + ${threatConfidence}%
-
+