This commit is contained in:
overcuriousity
2025-08-05 22:09:46 +02:00
parent 1c0025796a
commit b515a45e1e
6 changed files with 22 additions and 79 deletions

View File

@@ -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">