Skip to content

Commit c092120

Browse files
committed
feat: add automatic checkpoint at task creation
- Create initial checkpoint when task starts to enable complete reset - Use allowEmpty=true to ensure checkpoint is created even with no changes - Use suppressMessage=true to avoid cluttering the UI - Addresses issue #8095 for better model testing workflow
1 parent a255c95 commit c092120

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/task/Task.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,14 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
16731673
// Kicks off the checkpoints initialization process in the background.
16741674
getCheckpointService(this)
16751675

1676+
// Create an initial checkpoint at the very beginning of task execution
1677+
// This allows users to completely reset to the initial state before any changes
1678+
// Use allowEmpty=true to ensure checkpoint is created even with no file changes
1679+
// Use suppressMessage=true to avoid cluttering the UI with this automatic checkpoint
1680+
if (this.enableCheckpoints) {
1681+
await this.checkpointSave(true, true)
1682+
}
1683+
16761684
let nextUserContent = userContent
16771685
let includeFileDetails = true
16781686

0 commit comments

Comments
 (0)