diff --git a/web/static/js/chat.js b/web/static/js/chat.js index 1c80d81c..f0f5d345 100644 --- a/web/static/js/chat.js +++ b/web/static/js/chat.js @@ -3412,6 +3412,21 @@ async function deleteConversation(conversationId, skipConfirm = false) { } else if (typeof loadConversations === 'function') { loadConversations(); } + + // 批量管理弹窗打开时,同步刷新弹窗内列表 + const batchModal = document.getElementById('batch-manage-modal'); + if (batchModal && batchModal.style.display === 'flex') { + allConversationsForBatch = allConversationsForBatch.filter(c => c.id !== conversationId); + updateBatchManageTitle(allConversationsForBatch.length); + const searchInput = document.getElementById('batch-search-input'); + const query = searchInput ? searchInput.value : ''; + if (query && query.trim()) { + filterBatchConversations(query); + } else { + renderBatchConversations(); + } + } + // 通知其他模块(如 WebShell AI 助手)同步删除,保持列表一致 try { document.dispatchEvent(new CustomEvent('conversation-deleted', { detail: { conversationId } })); diff --git a/web/static/js/projects.js b/web/static/js/projects.js index 8f48104c..f7f2e46e 100644 --- a/web/static/js/projects.js +++ b/web/static/js/projects.js @@ -872,7 +872,6 @@ async function viewProjectFactBody(factKey) { ]; if (f.related_vulnerability_id) metaParts.push(tpFmt('projects.factMetaRelatedVuln', `Related vulnerability: ${f.related_vulnerability_id}`, { value: f.related_vulnerability_id })); if (f.source_conversation_id) metaParts.push(tpFmt('projects.factMetaSourceConversation', `Source conversation: ${f.source_conversation_id}`, { value: f.source_conversation_id })); - if (f.supersedes_fact_id) metaParts.push(tp('projects.factMetaHasPrevious')); document.getElementById('fact-detail-meta').textContent = metaParts.join(' · '); document.getElementById('fact-detail-body').textContent = f.body || tp('projects.emptyBody'); const warnEl = document.getElementById('fact-detail-sparse-warn'); @@ -885,33 +884,6 @@ async function viewProjectFactBody(factKey) { warnEl.textContent = ''; } } - const prevWrap = document.getElementById('fact-detail-prev-wrap'); - if (prevWrap) { - prevWrap.hidden = true; - if (f.id && f.supersedes_fact_id) { - try { - const prevRes = await apiFetch( - `/api/projects/${currentProjectId}/facts/${encodeURIComponent(f.id)}/previous-version`, - ); - if (prevRes.ok) { - const prev = await prevRes.json(); - prevWrap.hidden = false; - document.getElementById('fact-detail-prev-meta').textContent = tpFmt( - 'projects.factPreviousMeta', - `Archived at ${formatProjectTime(prev.archived_at)} · Summary: ${prev.summary || '—'} · Confidence: ${prev.confidence || '—'}`, - { - time: formatProjectTime(prev.archived_at), - summary: prev.summary || '—', - confidence: prev.confidence || '—', - }, - ); - document.getElementById('fact-detail-prev-body').textContent = prev.body || tp('projects.emptyBody'); - } - } catch (e) { - console.warn(e); - } - } - } const linkBtn = document.getElementById('fact-detail-link-vuln-btn'); const createBtn = document.getElementById('fact-detail-create-vuln-btn'); if (linkBtn) linkBtn.hidden = false; diff --git a/web/templates/index.html b/web/templates/index.html index 43124e4d..a0152737 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -4250,12 +4250,6 @@
- -

当前版本