phase2-4 recall prompt-flow hardening

This commit is contained in:
Youzini-afk
2026-04-11 18:51:50 +08:00
parent 3a10dbb9ba
commit 0cb95c4f2b
14 changed files with 1069 additions and 143 deletions

View File

@@ -47,6 +47,8 @@ export function readPersistedRecallFromUserMessage(chat, userMessageIndex) {
updatedAt: toIsoString(record.updatedAt),
generationCount: Math.max(0, Number.parseInt(record.generationCount, 10) || 0),
manuallyEdited: Boolean(record.manuallyEdited),
authoritativeInputUsed: Boolean(record.authoritativeInputUsed),
boundUserFloorText: String(record.boundUserFloorText || ""),
};
}
@@ -69,6 +71,8 @@ export function buildPersistedRecallRecord(payload = {}, existingRecord = null)
updatedAt: nowIso,
generationCount: 0,
manuallyEdited: Boolean(payload.manuallyEdited),
authoritativeInputUsed: Boolean(payload.authoritativeInputUsed),
boundUserFloorText: String(payload.boundUserFloorText || ""),
};
}