pi

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package pi reads sessions from the pi coding agent's on-disk JSONL store.

Index

Constants

View Source
const EnvSessionsDir = "PI_CODING_AGENT_SESSION_DIR"

EnvSessionsDir is pi's own override for its sessions directory, honored so ccsession and pi always agree on where sessions live.

Variables

This section is empty.

Functions

func ResolveSessionsDir

func ResolveSessionsDir() (string, error)

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

func Open() (*Store, error)

func OpenAt

func OpenAt(dir string) *Store

func (*Store) FindByID

func (s *Store) FindByID(id string) (*session.Session, error)

func (*Store) FindByLocator

func (s *Store) FindByLocator(id, path string) (*session.Session, error)

func (*Store) GrepKeys

func (s *Store) GrepKeys(query string, regex bool) (map[string]struct{}, error)

func (*Store) Messages

func (s *Store) Messages(sessionID string, limit int) ([]session.Message, time.Time, int, error)

func (*Store) MessagesForSession

func (s *Store) MessagesForSession(sess *session.Session, limit int) ([]session.Message, time.Time, int, error)

func (*Store) Scan

func (s *Store) Scan() ([]*session.Session, error)

func (*Store) ScanFiltered

func (s *Store) ScanFiltered(allow map[string]struct{}) ([]*session.Session, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL