mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-25 11:44:22 +01:00
fix: await cleanupRevert() to prevent dupe msgs after undo (#2572)
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user