chore: update story summary and lint fixes
This commit is contained in:
@@ -184,7 +184,7 @@
|
||||
renderFilterRules(cfg?.textFilterRules || DEFAULT_FILTER_RULES);
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// Filter Rules UI
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
}
|
||||
|
||||
function updateVectorStats(stats) {
|
||||
$('vector-atom-count').textContent = stats.stateAtoms || 0;
|
||||
$('vector-atom-count').textContent = stats.stateVectors || 0;
|
||||
$('vector-chunk-count').textContent = stats.chunkCount || 0;
|
||||
$('vector-event-count').textContent = stats.eventVectors || 0;
|
||||
}
|
||||
@@ -276,19 +276,36 @@
|
||||
const pending = stats.pending || 0;
|
||||
const empty = stats.empty || 0;
|
||||
const fail = stats.fail || 0;
|
||||
const atomsCount = stats.atomsCount || 0;
|
||||
|
||||
$('anchor-extracted').textContent = extracted;
|
||||
$('anchor-total').textContent = total;
|
||||
$('anchor-pending').textContent = pending;
|
||||
|
||||
const extra = document.getElementById('anchor-extra');
|
||||
if (extra) extra.textContent = `空 ${empty} · 失败 ${fail}`;
|
||||
$('anchor-atoms-count').textContent = atomsCount;
|
||||
|
||||
const pendingWrap = $('anchor-pending-wrap');
|
||||
if (pendingWrap) {
|
||||
pendingWrap.classList.toggle('hidden', pending === 0);
|
||||
}
|
||||
|
||||
// 显示 empty/fail 信息
|
||||
const extraWrap = $('anchor-extra-wrap');
|
||||
const extraSep = $('anchor-extra-sep');
|
||||
const extra = $('anchor-extra');
|
||||
if (extraWrap && extra) {
|
||||
if (empty > 0 || fail > 0) {
|
||||
const parts = [];
|
||||
if (empty > 0) parts.push(`空 ${empty}`);
|
||||
if (fail > 0) parts.push(`失败 ${fail}`);
|
||||
extra.textContent = parts.join(' · ');
|
||||
extraWrap.style.display = '';
|
||||
if (extraSep) extraSep.style.display = '';
|
||||
} else {
|
||||
extraWrap.style.display = 'none';
|
||||
if (extraSep) extraSep.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
const emptyWarning = $('vector-empty-l0-warning');
|
||||
if (emptyWarning) {
|
||||
emptyWarning.classList.toggle('hidden', extracted > 0);
|
||||
@@ -337,7 +354,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
function initVectorUI() {
|
||||
function initVectorUI() {
|
||||
$('vector-enabled').onchange = e => {
|
||||
$('vector-config-area').classList.toggle('hidden', !e.target.checked);
|
||||
};
|
||||
@@ -966,6 +983,7 @@ function initVectorUI() {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function setRecallLog(text) {
|
||||
lastRecallLogText = text || '';
|
||||
updateRecallLogDisplay();
|
||||
@@ -974,14 +992,27 @@ function initVectorUI() {
|
||||
function updateRecallLogDisplay() {
|
||||
const content = $('recall-log-content');
|
||||
if (!content) return;
|
||||
|
||||
if (lastRecallLogText) {
|
||||
content.textContent = lastRecallLogText;
|
||||
content.classList.remove('recall-empty');
|
||||
} else {
|
||||
setHtml(content, '<div class="recall-empty">暂无召回日志<br><br>当 AI 生成回复时,系统会自动进行记忆召回。<br>召回日志将显示:<br>• 查询文本<br>• L1 片段匹配结果<br>• L2 事件召回详情<br>• 耗时统计</div>');
|
||||
setHtml(content, `<div class="recall-empty">
|
||||
暂无召回日志<br><br>
|
||||
当 AI 生成回复时,系统会自动进行记忆召回。<br><br>
|
||||
召回日志将显示:<br>
|
||||
• [L0] Query Understanding - 意图识别<br>
|
||||
• [L1] Constraints - 硬约束注入<br>
|
||||
• [L2] Narrative Retrieval - 事件召回<br>
|
||||
• [L3] Evidence Assembly - 证据装配<br>
|
||||
• [L4] Prompt Formatting - 格式化<br>
|
||||
• [Budget] Token 预算使用情况<br>
|
||||
• [Quality] 质量指标与潜在问题
|
||||
</div>`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// Editor
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
@@ -1117,7 +1148,7 @@ function initVectorUI() {
|
||||
};
|
||||
}
|
||||
|
||||
function openEditor(section) {
|
||||
function openEditor(section) {
|
||||
currentEditSection = section;
|
||||
const meta = SECTION_META[section];
|
||||
const es = $('editor-struct');
|
||||
@@ -1368,10 +1399,10 @@ function initVectorUI() {
|
||||
btnCancel.classList.remove('hidden');
|
||||
btnClear.classList.add('hidden');
|
||||
|
||||
const percent = d.total > 0 ? Math.round(d.current / d.total * 100) : 0;
|
||||
progress.querySelector('.progress-inner').style.width = percent + '%';
|
||||
const displayText = d.message || `${d.phase || ''}: ${d.current}/${d.total}`;
|
||||
progress.querySelector('.progress-text').textContent = displayText;
|
||||
const percent = d.total > 0 ? Math.round(d.current / d.total * 100) : 0;
|
||||
progress.querySelector('.progress-inner').style.width = percent + '%';
|
||||
const displayText = d.message || `${d.phase || ''}: ${d.current}/${d.total}`;
|
||||
progress.querySelector('.progress-text').textContent = displayText;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user