fix: preserve agent context during compaction (#4556)

This commit is contained in:
Patrick Wolf
2025-11-21 00:13:10 -08:00
committed by GitHub
parent e018e16898
commit 416f2964b5
3 changed files with 17 additions and 3 deletions

View File

@@ -398,6 +398,7 @@ export namespace SessionPrompt {
messages: msgs,
parentID: lastUser.id,
abort,
agent: lastUser.agent,
model: {
providerID: model.providerID,
modelID: model.modelID,
@@ -416,6 +417,7 @@ export namespace SessionPrompt {
) {
await SessionCompaction.create({
sessionID,
agent: lastUser.agent,
model: lastUser.model,
})
continue