Documentation
¶
Overview ¶
Package monitor provides a shared session enrichment layer that both the TUI and web dashboard consume. It eliminates data drift by centralizing the session discovery, classification, session-index loading, transcript reading, and git metadata enrichment into a single Snapshot function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadLastMeaningfulLine ¶
ReadLastMeaningfulLine reads the tail of a transcript JSONL and extracts the last human-readable content. It looks for assistant text or user messages, skipping tool outputs, base64 data, and system events.
Types ¶
type Session ¶
type Session struct {
ID string
PID int
CWD string
State string // "busy", "waiting", "idle", "dead"
Project string
StartedAt time.Time
WorkingOn string // from session index summary
LastLine string // last meaningful transcript line
TranscriptPath string
GitBranch string
GitDirty bool
MessageCount int // from session index
}
Session is the fully-enriched session type that both TUI and web consume. It is a flat struct (no embedding) to avoid coupling with discovery.Session.
Click to show internal directories.
Click to hide internal directories.