Fix vector generation error handling
This commit is contained in:
@@ -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