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:
parent
55ea481707
commit
e515b2c714
4 changed files with 13 additions and 89 deletions
|
@ -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| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue