mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
4c1bda9541
Empty sessions (no messages) are now automatically cleaned up: 1. On shutdown: When kit exits cleanly, if the current session has no messages, the session file is deleted. 2. On /resume: When listing sessions for the resume picker, any empty session files are deleted and not shown in the list. This prevents accumulation of orphaned empty session files when users start sessions but don't send any messages. Changes: - internal/session/tree_manager.go: add IsEmpty() helper - internal/app/app.go: delete empty session on Close() - internal/session/store.go: filter and delete empty sessions in listSessionsInDir()