sessions

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodexHomeFromEnv

func CodexHomeFromEnv(home string) string

func Find

func Find(codexHome string, sessionID string) (string, error)

func FormatBriefJSON

func FormatBriefJSON(brief *SessionBrief) ([]byte, error)

func FormatBriefText

func FormatBriefText(brief *SessionBrief, home string) string

func FormatListJSON

func FormatListJSON(sessions []Session) ([]byte, error)

func FormatListTable

func FormatListTable(sessions []Session, home string) string

func PrintLog

func PrintLog(path string, w io.Writer, tail int) error

Types

type DisplayEvent

type DisplayEvent struct {
	Kind      string `json:"kind"`
	Text      string `json:"text"`
	Formatted string `json:"formatted"`
}

type Session

type Session struct {
	ID        string    `json:"id"`
	StartedAt time.Time `json:"started_at"`
	CWD       string    `json:"cwd"`
	Path      string    `json:"path"`
}

func List

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

type SessionBrief

type SessionBrief struct {
	Session
	Status         string         `json:"status"`
	LineCount      int            `json:"line_count"`
	RecentMessages []DisplayEvent `json:"recent_messages"`
}

func Brief

func Brief(codexHome string, sessionID string, lastN int) (*SessionBrief, error)

Jump to

Keyboard shortcuts

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