lcode 0.3.0
Undo for local models. lcode now saves a checkpoint before the model changes your files, so a wrong edit or a script that went sideways is one command away from being undone.
Added
/undotakes back the file changes of the last request. Before the model first changes files in a request, lcode saves a checkpoint./undothen restores edited and deleted files and removes new ones, including changes made by shell commands./undoagain goes further back./rewind Ngoes back to before request N, optionally removing those requests from the conversation too./checkpointslists them.
- Checkpoints live in a separate git repository in lcode's state folder, so your own repository is never touched. They also work in folders that aren't git repositories. Turn them off with
lcode config set checkpoints false.
● edit_file(calc.py)
✓ Edited calc.py
● write_file(notes.md)
✓ Created notes.md (1 lines)
$ rm old.txt
↶ Checkpoint 1: 3 files changed · /undo reverts them
❯ /undo
Undoing request 1: In calc.py add a multiply(a, b) function. Also create notes.md with o…
restore calc.py
restore old.txt
remove notes.md
Done: restored calc.py, old.txt; removed notes.md.
Details: Undo and checkpoints
Upgrade
uv tool upgrade lcode-cli # or: pipx upgrade lcode-cliFull changelog: v0.2.2...v0.3.0