wip: always force create snapshot

This commit is contained in:
Dax Raad
2025-07-23 20:46:43 -04:00
parent 1ad529db59
commit 2c82ee592c
2 changed files with 3 additions and 3 deletions

View File

@@ -1084,7 +1084,7 @@ export namespace Session {
if ((msg.info.id === input.messageID && !input.partID) || part.id === input.partID) {
// if no useful parts left in message, same as reverting whole message
const partID = remaining.some((item) => ["text", "tool"].includes(item.type)) ? input.partID : undefined
const snapshot = session.revert?.snapshot ?? (await Snapshot.create(true))
const snapshot = session.revert?.snapshot ?? (await Snapshot.create())
log.info("revert snapshot", { snapshot })
if (lastSnapshot) await Snapshot.restore(lastSnapshot.snapshot)
const next = await update(input.sessionID, (draft) => {