fix(vector): reset fingerprint when clearing vectors

This commit is contained in:
2026-02-16 21:57:22 +08:00
parent 3b9d6d4829
commit 7a79d8f9b9

View File

@@ -615,7 +615,9 @@ async function handleClearVectors() {
await clearEventVectors(chatId); await clearEventVectors(chatId);
await clearAllChunks(chatId); await clearAllChunks(chatId);
await clearStateVectors(chatId); await clearStateVectors(chatId);
await updateMeta(chatId, { lastChunkFloor: -1 }); // Reset both boundary and fingerprint so next incremental build starts from floor 0
// without being blocked by stale engine fingerprint mismatch.
await updateMeta(chatId, { lastChunkFloor: -1, fingerprint: null });
await sendVectorStatsToFrame(); await sendVectorStatsToFrame();
await executeSlashCommand('/echo severity=info 向量数据已清除。如需恢复召回功能,请重新点击"生成向量"。'); await executeSlashCommand('/echo severity=info 向量数据已清除。如需恢复召回功能,请重新点击"生成向量"。');
xbLog.info(MODULE_ID, "向量数据已清除"); xbLog.info(MODULE_ID, "向量数据已清除");