search

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchOptions

type SearchOptions struct {
	Preview     bool   // Whether to show preview window
	DetailLevel int    // 0: basic, 1: detailed, 2: full
	Query       string // Initial search query
	Repository  string // Filter by repository
	Author      string // Filter by author
	Interactive bool   // Whether to use interactive mode
	Format      string // Output format (oneline, detailed, full)
	Progressive bool   // Whether to use progressive loading
}

SearchOptions defines the configuration for interactive search

type SearchResult

type SearchResult struct {
	Hash         string    `json:"hash"`
	Date         time.Time `json:"date"`
	Author       string    `json:"author"`
	Message      string    `json:"message"`
	Repository   string    `json:"repository"`
	FileCount    int       `json:"file_count"`
	Additions    int       `json:"additions"`
	Deletions    int       `json:"deletions"`
	Branch       string    `json:"branch"`  // Added to show branch information
	DisplayText  string    `json:"-"`       // Used for fzf display
	FilesChanged []string  `json:"files"`   // List of changed files
	Preview      string    `json:"preview"` // Content preview for files
}

SearchResult represents a single commit in the search results

func RunInteractiveSearchProgressive

func RunInteractiveSearchProgressive(resultsChan <-chan SearchResult, opts SearchOptions) ([]SearchResult, error)

RunInteractiveSearchProgressive starts an interactive search session using fzf with progressive loading

Jump to

Keyboard shortcuts

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