Skip to main content

Module session

Module session 

Source
Expand description

Lines of a session file: one header, then entries forming a tree.

Mirrors packages/coding-agent/src/core/session-manager.ts in pi v1.0.0. Each line is one JSON object; crate::json::to_string plus \n writes it.

Structs§

BranchSummaryEntry
CompactionEntry
ContextEditEntry
Replaces or removes an earlier entry’s contribution to the model context.
CustomEntry
pi writes the tree position last for this entry.
CustomMessageEntry
pi writes the tree position last for this entry.
EntryMeta
Tree position shared by every entry.
LabelEntry
MessageEntry
ModelChangeEntry
Replacement
SessionHeader
SessionInfoEntry
ThinkingLevelChangeEntry
UsageEntry
Usage outside model responses, such as cache warming.

Enums§

FileEntry
One line of a session file, tagged by type.

Constants§

CURRENT_VERSION
Session file format version that pi v1.0.0 writes.