mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-06-10 08:13:59 +02:00
Add files via upload
This commit is contained in:
@@ -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 } }));
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user