Fix vector generation error handling
This commit is contained in:
@@ -164,7 +164,7 @@
|
||||
<div class="settings-tab active" data-tab="tab-summary">总结设置</div>
|
||||
<div class="settings-tab" data-tab="tab-vector">向量设置</div>
|
||||
<div class="settings-tab" data-tab="tab-debug">调试</div>
|
||||
<div class="settings-tab" data-tab="tab-guide">使用说明</div>
|
||||
<div class="settings-tab" data-tab="tab-guide">说明</div>
|
||||
</div>
|
||||
<button class="modal-close" id="settings-close">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
@@ -514,7 +514,7 @@
|
||||
</div>
|
||||
|
||||
<div class="settings-hint" style="margin-top:8px">
|
||||
向量化现有数据,生成速度很快
|
||||
向量化现有数据
|
||||
</div>
|
||||
|
||||
<!-- 导入导出 -->
|
||||
@@ -800,4 +800,4 @@
|
||||
<script src="story-summary-ui.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
@@ -468,8 +468,8 @@ async function handleGenerateVectors(vectorCfg) {
|
||||
const message = chat[floor];
|
||||
if (!message) continue;
|
||||
|
||||
const { chunks, status } = chunkMessage(message, floor, vectorCfg, true);
|
||||
if (status === "skip") continue;
|
||||
const chunks = chunkMessage(floor, message);
|
||||
if (!chunks.length) continue;
|
||||
|
||||
allChunks.push(...chunks);
|
||||
}
|
||||
@@ -548,6 +548,10 @@ async function handleGenerateVectors(vectorCfg) {
|
||||
await sendVectorStatsToFrame();
|
||||
|
||||
xbLog.info(MODULE_ID, `向量生成完成: L0=${atoms.length}, L1=${l1Vectors.length}, L2=${l2Pairs.length}`);
|
||||
} catch (e) {
|
||||
xbLog.error(MODULE_ID, '向量生成失败', e);
|
||||
postToFrame({ type: "VECTOR_GEN_PROGRESS", phase: "ALL", current: -1, total: 0 });
|
||||
await sendVectorStatsToFrame();
|
||||
} finally {
|
||||
release();
|
||||
vectorCancelled = false;
|
||||
|
||||
Reference in New Issue
Block a user