sessionlog

package
v0.0.1-alpha16 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlattenAssistantOutput

func FlattenAssistantOutput(entries []Entry) string

FlattenAssistantOutput concatenates all assistant and plain-text entries into a single string, suitable for feeding to a review pipeline.

Types

type Entry

type Entry struct {
	Kind      EntryKind
	Text      string
	InputKind string
	Tool      string
	Question  string
	Context   string
	Uncertain bool
	Stage     string
	Summary   string
	Message   string
	IsError   bool
	Intent    string
}

func ParseLine

func ParseLine(line string) (Entry, bool)

func ReadFile

func ReadFile(path string) ([]Entry, error)

ReadFile reads all log entries from a file path. Gzip-compressed files (suffix .gz) are decompressed transparently.

func ScanEntries

func ScanEntries(r io.Reader) ([]Entry, error)

ScanEntries reads all log entries from r. It uses a 10 MB scanner buffer to handle large log lines.

type EntryKind

type EntryKind string
const (
	KindPlain      EntryKind = "plain"
	KindInput      EntryKind = "input"
	KindAssistant  EntryKind = "assistant_output"
	KindThinking   EntryKind = "thinking_output"
	KindToolStart  EntryKind = "tool_start"
	KindToolOutput EntryKind = "tool_output"
	KindToolResult EntryKind = "tool_result"
	KindQuestion   EntryKind = "question"
	KindForeman    EntryKind = "foreman_proposed"
	KindLifecycle  EntryKind = "lifecycle"
)

Jump to

Keyboard shortcuts

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