Przeglądaj źródła

fix: await cleanupRevert() to prevent dupe msgs after undo (#2572)

Stephen Murray 5 miesięcy temu
rodzic
commit
c02f58c2af
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      packages/opencode/src/session/index.ts

+ 2 - 2
packages/opencode/src/session/index.ts

@@ -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"),