Expand description
Append-only JSONL sessions, stored as a tree of entries.
Every entry carries an id and a parent id. The active branch is the parent chain walked back from the last entry, so nothing is ever rewritten and a compaction is an entry that shadows what came before it.
Structs§
- Header
- The first line of a session file.
- Session
- An open session and the history it is backed by.
- Session
File - One session file, and when it was last written.
- Session
Log - A session file opened for appending.
Enums§
- Entry
- One line of a session file.
Constants§
- CURRENT_
VERSION - The version of the session file format this build writes.
Functions§
- default_
dir - Default location for session files.
- entry_
to_ message - The message an entry contributes to the conversation, if any.
- list_
sessions - The sessions in
dir, newest first. - new_
session_ name - A name no other session has: the second it was made, and the process id.
- path_
for - The path for a named session.
- session_
name_ of - The name of a session file, without the directory or the extension.
- summary_
message - The message a compaction contributes to the conversation.