feat: Tauri SQLite 事件持久化 + 讲述点追问补全(缺失检测→模板追问→沉默即数据)

This commit is contained in:
Jayway Liu
2026-10-03 12:55:00 +08:00
parent 6117ef894f
commit ba50cf3928
18 changed files with 1360 additions and 34 deletions
+8 -1
View File
@@ -62,9 +62,16 @@ console.log(' 抽取:', JSON.stringify(profile));
await engine.confirmIdentity(profile);
while (engine.currentNode().type !== 'narration') engine.advance();
const farewell = '外婆走的那天我在外地考试,没赶上最后一面。后来我每年清明都回去,院子里的桂花树还在。';
const result = await engine.submitNarration(farewell);
let result = await engine.submitNarration(farewell);
console.log('\n[2] C1-02 情绪签名 → 场景变体');
console.log(' 输入:', farewell);
if (!result && engine.state.pendingFollowUp) {
// 追问补全(六维缺失检测):真 key 下可能挂起追问,回答一句完成流程
const p = engine.state.pendingFollowUp;
console.log(` 追问(${p.dimension}): ${p.prompt}`);
result = await engine.answerFollowUp('院子里是桂花的甜香,风一吹就往屋里钻。');
}
if (!result) throw new Error('讲述流程未完成');
console.log(` 签名: ${result.variant.signature} → 变体: ${result.variant.variantId}(${result.variant.label})`);
// --- 3. 画像报告 7 维 score ---