feat: add a new .recover command for sessions to recover from errors
CI / All (ubuntu-latest) (push) Failing after 24s
CI / All (macos-latest) (push) Has been cancelled
CI / All (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-08-04 12:02:31 -06:00
parent e76c3efe4e
commit e6dc24beb5
4 changed files with 130 additions and 15 deletions
+13
View File
@@ -699,6 +699,19 @@ impl Session {
Ok(())
}
pub fn flush(&mut self) -> Result<()> {
if !self.dirty {
return Ok(());
}
if let Some(path) = self.path.clone() {
let name = self.name.clone();
self.save(&name, Path::new(&path), false)?;
}
Ok(())
}
pub fn guard_empty(&self) -> Result<()> {
if !self.is_empty() {
bail!(