mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
fix: await cleanupRevert() to prevent dupe msgs after undo (#2572)
This commit is contained in:
parent
c8f4d54f7f
commit
c02f58c2af
@ -463,7 +463,7 @@ export namespace Session {
|
||||
// Process revert cleanup first, before creating new messages
|
||||
const session = await get(input.sessionID)
|
||||
if (session.revert) {
|
||||
cleanupRevert(session)
|
||||
await cleanupRevert(session)
|
||||
}
|
||||
const userMsg: MessageV2.Info = {
|
||||
id: input.messageID ?? Identifier.ascending("message"),
|
||||
@ -1131,7 +1131,7 @@ export namespace Session {
|
||||
using abort = lock(input.sessionID)
|
||||
const session = await get(input.sessionID)
|
||||
if (session.revert) {
|
||||
cleanupRevert(session)
|
||||
await cleanupRevert(session)
|
||||
}
|
||||
const userMsg: MessageV2.User = {
|
||||
id: Identifier.ascending("message"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user