cleanup
This commit is contained in:
@@ -702,12 +702,10 @@ class AIQueryInterface {
|
||||
toolsByPhase[phase] = [];
|
||||
});
|
||||
|
||||
// DEBUG: Log recommendation structure
|
||||
console.log('[AI Results] Recommendation structure:', recommendation);
|
||||
console.log('[AI Results] Recommended tools:', recommendation.recommended_tools);
|
||||
|
||||
recommendation.recommended_tools?.forEach(recTool => {
|
||||
// DEBUG: Log each tool's confidence data
|
||||
console.log('[AI Results] Tool confidence data:', recTool.name, recTool.confidence);
|
||||
|
||||
if (toolsByPhase[recTool.phase]) {
|
||||
@@ -716,7 +714,7 @@ class AIQueryInterface {
|
||||
toolsByPhase[recTool.phase].push({
|
||||
...fullTool,
|
||||
recommendation: recTool,
|
||||
confidence: recTool.confidence, // Ensure confidence is passed
|
||||
confidence: recTool.confidence,
|
||||
justification: recTool.justification,
|
||||
priority: recTool.priority,
|
||||
recommendationStrength: recTool.recommendationStrength
|
||||
@@ -836,13 +834,11 @@ class AIQueryInterface {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Calculate summary statistics
|
||||
const totalTime = auditTrail.reduce((sum, entry) => sum + entry.processingTimeMs, 0);
|
||||
const avgConfidence = auditTrail.reduce((sum, entry) => sum + entry.confidence, 0) / auditTrail.length;
|
||||
const lowConfidenceSteps = auditTrail.filter(entry => entry.confidence < 60).length;
|
||||
const highConfidenceSteps = auditTrail.filter(entry => entry.confidence >= 80).length;
|
||||
|
||||
// Group entries by phase for better organization
|
||||
const groupedEntries = auditTrail.reduce((groups, entry) => {
|
||||
if (!groups[entry.phase]) groups[entry.phase] = [];
|
||||
groups[entry.phase].push(entry);
|
||||
@@ -1048,7 +1044,6 @@ class AIQueryInterface {
|
||||
second: '2-digit'
|
||||
});
|
||||
|
||||
// Reuse existing grid and text utilities
|
||||
return `
|
||||
<div class="border-l-2 pl-3 py-2 mb-2" style="border-left-color: ${confidenceColor};">
|
||||
<div class="flex justify-between items-center mb-1">
|
||||
|
||||
Reference in New Issue
Block a user