Skip to content

Commit 8e5b0bc

Browse files
committed
Limit checkpoint storage to 100 most recent entries
1 parent 400b1d9 commit 8e5b0bc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎packages/vscode/src/commands/checkpoints-command/actions/get-checkpoints.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export const remove_old_checkpoints = async (
2727
}
2828
}
2929

30+
if (checkpoints_to_keep.length >= 100) {
31+
const overflow = checkpoints_to_keep.splice(99)
32+
checkpoints_to_remove.push(...overflow)
33+
}
34+
3035
// Delete old checkpoint files
3136
for (const checkpoint of checkpoints_to_remove) {
3237
try {

0 commit comments

Comments
 (0)