mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-26 21:36:31 +02:00
every zot launch was creating a session file with just a meta line, even when the user exited without prompting. /sessions and ls -la ended up showing dozens of empty entries. now Session tracks messagesAppended and freshFile (true for NewSession, false for OpenSession). Close() removes the file when both conditions hold: this process created it AND no messages were ever appended. resumed sessions are never auto-deleted even if the resume run added nothing, since the prior content is real. PruneEmptySessions sweeps existing meta-only stubs from the cwd's session dir on each interactive launch. cheap (only reads enough of each file to find a 'message' line) and fixes the existing backlog automatically the first time you reopen zot in a project. |
||
|---|---|---|
| .. | ||
| agent.go | ||
| compact.go | ||
| core_test.go | ||
| cost.go | ||
| events.go | ||
| session.go | ||
| tool.go | ||