fix: 调小 snapshots 的范围

This commit is contained in:
claude-code-best
2026-05-05 21:09:02 +08:00
parent 0ad6349434
commit 3f1c8468bf

View File

@@ -51,7 +51,9 @@ export type FileHistoryState = {
snapshotSequence: number
}
const MAX_SNAPSHOTS = 100
// Disabled: file checkpointing causes unbounded memory growth (100 snapshots × full file backups).
// See heap snapshot analysis — re-enable only after switching to incremental diffs.
const MAX_SNAPSHOTS = 20
export type DiffStats =
| {
filesChanged?: string[]