// CodexLens Manager - Configuration, Model Management, and Semantic Dependencies // Extracted from cli-manager.js for better maintainability // ============================================================ // CODEXLENS CONFIGURATION MODAL // ============================================================ /** * Show CodexLens configuration modal */ async function showCodexLensConfigModal() { try { showRefreshToast(t('codexlens.loadingConfig'), 'info'); // Fetch current config const response = await fetch('/api/codexlens/config'); const config = await response.json(); const modalHtml = buildCodexLensConfigContent(config); // Create and show modal const tempContainer = document.createElement('div'); tempContainer.innerHTML = modalHtml; const modal = tempContainer.firstElementChild; document.body.appendChild(modal); // Initialize icons if (window.lucide) lucide.createIcons(); // Initialize event handlers initCodexLensConfigEvents(config); } catch (err) { showRefreshToast(t('common.error') + ': ' + err.message, 'error'); } } /** * Build CodexLens configuration modal content */ function buildCodexLensConfigContent(config) { const indexDir = config.index_dir || '~/.codexlens/indexes'; const indexCount = config.index_count || 0; const isInstalled = window.cliToolsStatus?.codexlens?.installed || false; return '