fix(session): check for context overflow mid-turn in finish-step (#6480)

This commit is contained in:
Saatvik Arya
2026-01-01 23:33:18 +05:30
committed by GitHub
parent 3b03324578
commit 7a3ff5b98f
3 changed files with 267 additions and 0 deletions

View File

@@ -549,6 +549,14 @@ export namespace SessionPrompt {
model,
})
if (result === "stop") break
if (result === "compact") {
await SessionCompaction.create({
sessionID,
agent: lastUser.agent,
model: lastUser.model,
auto: true,
})
}
continue
}
SessionCompaction.prune({ sessionID })