mirror of
https://github.com/HKUDS/CLI-Anything.git
synced 2026-08-28 23:27:04 +08:00
c1e5d4f195
One-shot commands start a fresh Session each run, so in-memory changes
were silently discarded without an explicit 'document save'. This ports
the same pattern already used in the Shotcut harness (commit 17a30ba):
- Add -s/--save flag to the cli() group
- Register ctx.call_on_close(_auto_save_callback)
- _auto_save_callback saves if session is modified and not in REPL mode