Update story summary recall and prompt

This commit is contained in:
2026-02-05 00:22:02 +08:00
parent 12db08abe0
commit 8137e206f9
18 changed files with 708 additions and 406 deletions

View File

@@ -32,7 +32,6 @@ function sanitizeFacts(parsed) {
if (!s || !pRaw) continue;
// 删除操作
if (item.retracted === true) {
ok.push({ s, p: pRaw, retracted: true });
continue;
@@ -43,11 +42,15 @@ function sanitizeFacts(parsed) {
const relP = normalizeRelationPredicate(pRaw);
const isRel = !!relP;
const fact = { s, p: isRel ? relP : pRaw, o };
const fact = {
s,
p: isRel ? relP : pRaw,
o,
isState: !!item.isState,
};
// 关系类保留 trend
if (isRel && item.trend) {
const validTrends = ['破裂', '厌恶', '反感', '陌生', '投缘', '亲密', '交融'];
const validTrends = ['??', '??', '??', '??', '??', '??', '??'];
if (validTrends.includes(item.trend)) {
fact.trend = item.trend;
}
@@ -59,6 +62,7 @@ function sanitizeFacts(parsed) {
parsed.factUpdates = ok;
}
// ═══════════════════════════════════════════════════════════════════════════
// causedBy 清洗(事件因果边)
// ═══════════════════════════════════════════════════════════════════════════