Polish agent checkpoints (#29265)

Release Notes:

- Improved performance of agent checkpoint creation.
- Fixed a bug that sometimes caused accidental deletions when restoring
to a previous agent checkpoint.
- Fixed a bug that caused checkpoints to be visible in the Git history.
This commit is contained in:
Antonio Scandurra 2025-04-23 13:37:55 +02:00 committed by GitHub
parent 55ea481707
commit e515b2c714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 89 deletions

View file

@ -619,24 +619,12 @@ impl Thread {
.await
.unwrap_or(false);
if equal {
git_store
.update(cx, |store, cx| {
store.delete_checkpoint(pending_checkpoint.git_checkpoint, cx)
})?
.detach();
} else {
if !equal {
this.update(cx, |this, cx| {
this.insert_checkpoint(pending_checkpoint, cx)
})?;
}
git_store
.update(cx, |store, cx| {
store.delete_checkpoint(final_checkpoint, cx)
})?
.detach();
Ok(())
}
Err(_) => this.update(cx, |this, cx| {