Skip to main content

Module session

Module session 

Source

Modules§

scratchpad
Per-session scratch directories.

Structs§

ConversationHistory
A complete conversation history
ConversationManager
Manages conversation persistence for a project
ConversationMeta
Lightweight session metadata, persisted as an <id>.meta sidecar so listing sessions doesn’t have to parse every full transcript. The <id>.json stays the source of truth; a session without a sidecar (older, or pre-sidecar) is listed by fully parsing it.
SessionEntry
One row in the picker: a conversation plus its on-disk size (shown in the meta line; not stored on the history itself).

Functions§

detect_git_branch
Best-effort current git branch of dir, for labelling --resume rows. None when dir isn’t a git work tree, git is absent, or HEAD is detached. Kept out of the pure reducer — callers invoke it in the impure startup path and stamp the result onto the conversation.
detect_git_sha
Best-effort short git SHA of dir’s HEAD, for session provenance. None outside a git work tree or when git is absent. Impure — stamped at startup alongside detect_git_branch, never in the reducer.
select_conversation
Show the searchable resume picker and return the chosen conversation, or None if the user cancelled. now is injected so the relative-time labels are testable and match the caller’s clock.