Add previousSummary to before_compact hook event

This commit is contained in:
Mario Zechner 2025-12-24 12:47:12 +01:00
parent 97bbd7a642
commit 403faafdbe
5 changed files with 29 additions and 2 deletions

View file

@ -130,6 +130,8 @@ export type SessionEvent =
| (SessionEventBase & {
reason: "before_compact";
cutPoint: CutPointResult;
/** Summary from previous compaction, if any. Include this in your summary to preserve context. */
previousSummary?: string;
/** Messages that will be summarized and discarded */
messagesToSummarize: AppMessage[];
/** Messages that will be kept after the summary (recent turns) */