fix: compact command after revert now properly cleans up revert state (#6235)

This commit is contained in:
Christopher Ochsenreither 2025-12-26 21:57:59 -07:00 • committed by GitHub
commit bfb9787361
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1084,6 +1084,8 @@ export namespace Server {
async (c) => {
const sessionID = c.req.valid("param").sessionID
const body = c.req.valid("json")
const session = await Session.get(sessionID)
await SessionRevert.cleanup(session)
const msgs = await Session.messages({ sessionID })
let currentAgent = await Agent.defaultAgent()
for (let i = msgs.length - 1; i >= 0; i--) {