history

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchCandidates

func FetchCandidates(repo *db.HistoryRepo, opts CandidateOpts) ([]db.HistoryEntry, error)

Types

type CandidateOpts

type CandidateOpts struct {
	Limit     int
	Dedupe    bool
	OnlyFails bool
}

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

func NewFilter

func NewFilter(cfg config.FilterConfig) (*Filter, error)

func (*Filter) ShouldRecord

func (f *Filter) ShouldRecord(command string, exitCode int, directory string) bool

type ScoredEntry

type ScoredEntry struct {
	Entry      db.HistoryEntry
	MatchInfo  match.Match
	FinalScore int
}

func ScoreAndSort

func ScoreAndSort(entries []db.HistoryEntry, matches []match.Match, opts ScoringOpts) []ScoredEntry

type ScoringOpts

type ScoringOpts struct {
	CWD         string
	CWDBonus    int
	RecencyBase int
}

func DefaultScoringOpts

func DefaultScoringOpts(cwd string) ScoringOpts

Jump to

Keyboard shortcuts

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