Help us shape the future of Go! Take the 2026 Go Developer Survey

sessions

package
v0.0.204 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(ctx context.Context, agent *opencode.OpencodeAgent, sessionID string) (*opencode.SessionExport, error)

func FormatInfoText added in v0.0.43

func FormatInfoText(info *SessionInfo, home string, now time.Time) string

func FormatListTable added in v0.0.43

func FormatListTable(sessions []Session, home string, now time.Time) string

func OpenCodeDataHome added in v0.0.43

func OpenCodeDataHome(home string) string

Types

type Session added in v0.0.43

type Session struct {
	ID           string
	LastActiveAt time.Time
	CWD          string
	Title        string
	Path         string
	NumMessages  int
}

func Find added in v0.0.43

func Find(dataDir, sessionID string) (Session, error)

func List added in v0.0.43

func List(dataDir string, limit int) ([]Session, error)

type SessionInfo added in v0.0.43

type SessionInfo struct {
	Session
	CreatedAt         time.Time
	UpdatedAt         time.Time
	NumMessages       int
	SessionPath       string
	MessageDir        string
	TotalInputTokens  int
	TotalOutputTokens int
	TotalCost         float64
}

func Info added in v0.0.43

func Info(dataDir, sessionID string) (*SessionInfo, error)

Jump to

Keyboard shortcuts

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