parser

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractToolUses

func ExtractToolUses(turns []models.Turn) []models.ToolUse

ExtractToolUses extracts tool usage information from turns

func GetDisplayName

func GetDisplayName(projectPath string) string

GetDisplayName creates a short display name from a project path

func ParseSession

func ParseSession(path string) ([]models.Turn, *models.Session, error)

ParseSession reads a session JSONL file and returns all turns

func ParseSessionReader

func ParseSessionReader(r io.Reader, sourcePath string) ([]models.Turn, *models.Session, error)

ParseSessionReader parses a session from an io.Reader

func ParseTurn

func ParseTurn(data []byte) (*models.Turn, error)

ParseTurn parses a single JSONL line into a Turn

Types

type HistoryEntry

type HistoryEntry = models.HistoryEntry

HistoryEntry represents an entry from history.jsonl Re-export from models for convenience

func ParseHistoryReader

func ParseHistoryReader(r io.Reader) ([]HistoryEntry, error)

ParseHistoryReader parses history entries from a reader

func ScanHistory

func ScanHistory(claudeHome string) ([]HistoryEntry, error)

ScanHistory reads the global history.jsonl file

type SessionFile

type SessionFile struct {
	Path        string    // Full path to .jsonl file
	SessionID   string    // UUID extracted from filename
	ProjectPath string    // Decoded project path
	ModTime     time.Time // File modification time from directory scan
}

SessionFile represents a discovered session file

func ScanClaudeHome

func ScanClaudeHome(claudeHome string) ([]SessionFile, error)

ScanClaudeHome scans the Claude Code data directory for session files

Jump to

Keyboard shortcuts

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