MCPcopy Create free account
hub / github.com/OpenRaiser/NanoResearch / undo

Method undo

nanoresearch/agents/code_editor.py:332–337  ·  view source on GitHub ↗

Rollback to the latest snapshot. Returns snapshot id or None.

(self)

Source from the content-addressed store, hash-verified

330 }
331
332 def undo(self) -> str | None:
333 """Rollback to the latest snapshot. Returns snapshot id or None."""
334 result = self.snapshot_mgr.rollback_latest()
335 if result:
336 self._log(f"Rolled back to {result}")
337 return result
338
339 def rollback_to(self, snapshot_id: str) -> bool:
340 """Rollback to a specific snapshot."""

Callers 1

code_editFunction · 0.95

Calls 1

rollback_latestMethod · 0.45

Tested by

no test coverage detected