| @@ -928,14 +928,13 @@ | ||
| 928 | 928 | }); |
| 929 | 929 | }); |
| 930 | 930 | |
| 931 | 931 | const urlGroups = Object.values(groupedByUrl).sort((a, b) => b.bestScore - a.bestScore); |
| 932 | - const usedUrlCount = data.sources_used > 0 ? data.sources_used : urlGroups.filter(g => g.usedForContext).length; | |
| 933 | - const chunksInfo = data.total_chunks_used > 0 ? data.total_chunks_used + ' chunks sent to AI' : ''; | |
| 932 | + const usedUrlCount = urlGroups.filter(g => g.usedForContext).length; | |
| 934 | 933 | |
| 935 | 934 | html += '<div class="mxch-rag-matches">'; |
| 936 | 935 | html += '<h3>Retrieved Documents</h3>'; |
| 937 | - html += '<p style="color: var(--mxch-text-secondary); font-size: 13px; margin-bottom: 16px;">' + usedUrlCount + ' source' + (usedUrlCount === 1 ? '' : 's') + ' used for response' + (chunksInfo ? ' · ' + chunksInfo : '') + '</p>'; | |
| 936 | + html += '<p style="color: var(--mxch-text-secondary); font-size: 13px; margin-bottom: 16px;">' + usedUrlCount + ' entr' + (usedUrlCount === 1 ? 'y' : 'ies') + ' used for response</p>'; | |
| 938 | 937 | |
| 939 | 938 | urlGroups.forEach(function(group) { |
| 940 | 939 | const cardClass = group.usedForContext ? 'mxch-rag-match-used' : 'mxch-rag-match-below'; |
| 941 | 940 | const statusIcon = group.usedForContext ? '✓' : '✗'; |