From d2827ae9482bdaeab3194c41f42abbd4f9db3888 Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Thu, 5 Feb 2026 16:01:10 +0800 Subject: [PATCH] fix(session): add pruning to SessionEntry reason type The CompactionResult type includes "pruning" as a reason but SessionEntry did not, causing type errors when writing compaction entries. Co-Authored-By: Claude Opus 4.5 --- src/agent/session/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agent/session/types.ts b/src/agent/session/types.ts index 72c810ab9e..2d31190299 100644 --- a/src/agent/session/types.ts +++ b/src/agent/session/types.ts @@ -23,5 +23,5 @@ export type SessionEntry = tokensKept?: number | undefined; /** 摘要模式生成的摘要 */ summary?: string | undefined; - reason?: "count" | "tokens" | "summary" | undefined; + reason?: "count" | "tokens" | "summary" | "pruning" | undefined; };