|
@@ -1084,7 +1084,7 @@ export namespace Session {
|
|
|
if ((msg.info.id === input.messageID && !input.partID) || part.id === input.partID) {
|
|
if ((msg.info.id === input.messageID && !input.partID) || part.id === input.partID) {
|
|
|
// if no useful parts left in message, same as reverting whole message
|
|
// 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 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 })
|
|
log.info("revert snapshot", { snapshot })
|
|
|
if (lastSnapshot) await Snapshot.restore(lastSnapshot.snapshot)
|
|
if (lastSnapshot) await Snapshot.restore(lastSnapshot.snapshot)
|
|
|
const next = await update(input.sessionID, (draft) => {
|
|
const next = await update(input.sessionID, (draft) => {
|