Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

feat: Add 'Classify Domains with AI' button to research details page

LearningCircuit68cf99255fc1
diff --git a/src/local_deep_research/web/static/js/components/details.js b/src/local_deep_research/web/static/js/components/details.js
index 0faeaa17a2..87e116cfb4 100644
--- a/src/local_deep_research/web/static/js/components/details.js
+++ b/src/local_deep_research/web/static/js/components/details.js
@@ -181,6 +181,56 @@
}
});
}
+ } else if (data.total_links > 0) {
+ // Show placeholder when there are links but no categories
+ const chartContainer = document.getElementById('source-type-chart').parentElement;
+ chartContainer.innerHTML = `
+ <div style="display: flex; flex-direction: column; align-items: center; justify-content: center; height: 300px; text-align: center;">
+ <i class="fas fa-robot" style="font-size: 3rem; color: var(--text-secondary); margin-bottom: 1rem;"></i>
+ <h3 style="color: var(--text-primary); margin-bottom: 0.5rem;">AI Classification Not Available</h3>
+ <p style="color: var(--text-secondary); margin-bottom: 1rem; max-width: 400px;">
+ Domain categories haven't been classified yet. Use the button below to analyze your domains.
+ </p>
+ </div>
+ `;
+ } else {
+ // Show no links message
+ const chartContainer = document.getElementById('source-type-chart').parentElement;
+ chartContainer.innerHTML = `
+ <div style="display: flex; flex-direction: column; align-items: center; justify-content: center; height: 300px; text-align: center;">
+ <i class="fas fa-link" style="font-size: 3rem; color: var(--text-secondary); margin-bottom: 1rem;"></i>
+ <h3 style="color: var(--text-primary); margin-bottom: 0.5rem;">No Links Available</h3>
+ <p style="color: var(--text-secondary);">This research session doesn't have any links to classify.</p>
+ </div>
+ `;
+ }
+
+ // Always add the classify button if there are links (alongside the chart or placeholder)
+ if (data.total_links > 0) {
+ const sourceDistributionSection = document.getElementById('source-distribution-section');
+ const cardContent = sourceDistributionSection.querySelector('.card-content');
+
+ // Add classify button container after the chart
+ const classifyContainer = document.createElement('div');
+ classifyContainer.innerHTML = `
+ <div style="text-align: center; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border-color);">
+ <button id="classify-domains-btn" class="btn btn-primary" style="display: flex; align-items: center; gap: 0.5rem; margin: 0 auto;">
+ <i class="fas fa-magic"></i>
+ Classify Domains with AI
+ </button>
+ <p style="color: var(--text-secondary); font-size: 0.875rem; margin-top: 0.5rem;">
+ Analyze and categorize all domains using AI classification
+ </p>
+ </div>
+ `;
+ cardContent.appendChild(classifyContainer);
+
+ // Add click handler for link analytics button
+ const classifyBtn = document.getElementById('classify-domains-btn');
+
+ classifyBtn.addEventListener('click', () => {
+ window.location.href = '/metrics/links';
+ });
}
} catch (error) {