~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
chore(library): remove dead create-collection modal (#4155)
LearningCircuit418669c124b5
diff --git a/src/local_deep_research/web/static/js/collections_manager.js b/src/local_deep_research/web/static/js/collections_manager.jsindex c4262138b1..be43fb5fa4 100644--- a/src/local_deep_research/web/static/js/collections_manager.js+++ b/src/local_deep_research/web/static/js/collections_manager.js@@ -5,7 +5,6 @@// Store collections datalet collections = [];-const currentCollectionId = null;// safeFetch is now provided by utils/safe-fetch.js loaded in base.html@@ -22,30 +21,6 @@ document.addEventListener('DOMContentLoaded', function() {autoIndexToggle.addEventListener('change', saveAutoIndexSetting);}- // Setup modal handlers (only if modal form exists)- const createCollectionModalForm = document.getElementById('create-collection-modal-form');- if (createCollectionModalForm) {- createCollectionModalForm.addEventListener('submit', handleCreateCollection);- }-- const cancelCreateBtn = document.getElementById('cancel-create-btn');- if (cancelCreateBtn) {- cancelCreateBtn.addEventListener('click', hideCreateCollectionModal);- }-- // Setup close buttons- document.querySelectorAll('.modal .ldr-close').forEach(btn => {- btn.addEventListener('click', () => {- hideCreateCollectionModal();- });- });-- // Click outside modal to close- window.addEventListener('click', (event) => {- if (event.target.classList.contains('modal')) {- event.target.style.display = 'none';- }- });});/**@@ -166,76 +141,6 @@ function renderCollections() {`).join('');}-/**- * Show create collection modal- */-function showCreateCollectionModal() {- document.getElementById('create-collection-modal').style.display = 'flex';- document.getElementById('modal-collection-name').focus();-}--/**- * Hide create collection modal- */-function hideCreateCollectionModal() {- document.getElementById('create-collection-modal').style.display = 'none';- document.getElementById('create-collection-modal-form').reset();-}--/**- * Handle create collection form submission- */-async function handleCreateCollection(event) {- event.preventDefault();-- const name = document.getElementById('modal-collection-name').value.trim();- const description = document.getElementById('modal-collection-description').value.trim();-- if (!name) {- showError('Collection name is required');- return;- }-- try {- const csrfToken = window.api ? window.api.getCsrfToken() : '';- const response = await safeFetch(URLS.LIBRARY_API.COLLECTIONS, {- method: 'POST',- headers: {- 'Content-Type': 'application/json',- 'X-CSRFToken': csrfToken- },- body: JSON.stringify({- name,- description,- type: 'user_uploads'- })- });-- const data = await response.json();- if (data.success) {- showSuccess(`Collection "${name}" created successfully`);- hideCreateCollectionModal();- loadCollections();- } else {- showError('Failed to create collection: ' + data.error);- }- } catch (error) {- SafeLogger.error('Error creating collection:', error);- showError('Failed to create collection');- }-}--/**- * Format bytes to human readable- */-function formatBytes(bytes) {- if (bytes === 0) return '0 B';- const k = 1024;- const sizes = ['B', 'KB', 'MB', 'GB'];- const i = Math.floor(Math.log(bytes) / Math.log(k));- return Math.round(bytes / k ** i * 100) / 100 + ' ' + sizes[i];-}-// Prefer the full escapeHtml from xss-protection.js; inline fallback if it hasn't loaded yet// bearer:disable javascript_lang_manual_html_sanitizationconst escapeHtml = window.escapeHtml || function(str) {@@ -258,10 +163,3 @@ function showSuccess(message) {function showError(message) {alert('Error: ' + message);}--/**- * Show info message- */-function showInfo(message) {- SafeLogger.log('Info: ' + message);-}diff --git a/src/local_deep_research/web/templates/pages/collections.html b/src/local_deep_research/web/templates/pages/collections.htmlindex eec857c7af..7ca8cf57f9 100644--- a/src/local_deep_research/web/templates/pages/collections.html+++ b/src/local_deep_research/web/templates/pages/collections.html@@ -56,31 +56,5 @@</div></div>-<!-- Create Collection Modal -->-<div id="create-collection-modal" class="ldr-modal">- <div class="ldr-modal-content">- <div class="ldr-modal-header">- <h3>Create New Collection</h3>- <span class="ldr-close">×</span>- </div>- <div class="ldr-modal-body">- <form id="create-collection-modal-form">- <div class="ldr-form-group">- <label for="modal-collection-name">Collection Name *</label>- <input type="text" id="modal-collection-name" name="name" required placeholder="e.g., Research Papers, Work Documents">- </div>- <div class="ldr-form-group">- <label for="modal-collection-description">Description</label>- <textarea id="modal-collection-description" name="description" rows="3" placeholder="Describe what this collection is for..."></textarea>- </div>- <div class="ldr-form-actions">- <button type="button" class="ldr-btn-collections ldr-btn-collections-secondary" id="cancel-create-btn">Cancel</button>- <button type="submit" class="ldr-btn-collections ldr-btn-collections-primary">Create Collection</button>- </div>- </form>- </div>- </div>-</div>-<script defer src="/static/js/collections_manager.js"></script>{% endblock %}