Skip to content

Commit 1954d45

Browse files
committed
feat(checkpoints): create checkpoint on user message send
1 parent 687b379 commit 1954d45

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/task/Task.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,12 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
890890
this.askResponseText = text
891891
this.askResponseImages = images
892892

893+
// Create a checkpoint whenever the user sends a message.
894+
// Use allowEmpty=true to ensure a checkpoint is recorded even if there are no file changes.
895+
if (askResponse === "messageResponse") {
896+
void this.checkpointSave(true)
897+
}
898+
893899
// Mark the last follow-up question as answered
894900
if (askResponse === "messageResponse" || askResponse === "yesButtonClicked") {
895901
// Find the last unanswered follow-up message using findLastIndex

0 commit comments

Comments
 (0)