Documentation
¶
Overview ¶
Package ui implements the Bubble Tea TUI for scry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataLoadedMsg ¶
type MetadataLoadedMsg struct {
Files []model.FileSummary
Gen int
Err error
}
MetadataLoadedMsg is sent when an async metadata reload completes.
type MetadataLoader ¶
type MetadataLoader interface {
ListFiles(ctx context.Context, cmp model.ResolvedCompare) ([]model.FileSummary, error)
}
MetadataLoader lists changed files for a compare range.
type Model ¶
Model is the top-level Bubble Tea model for scry.
func NewModel ¶
func NewModel(state model.AppState, opts ...ModelOption) Model
NewModel creates a Model from bootstrap data. Sets SelectedFile to -1 when the file list is empty, 0 otherwise.
type ModelOption ¶
type ModelOption func(*Model)
ModelOption configures optional Model dependencies.
func WithMetadataLoader ¶
func WithMetadataLoader(ml MetadataLoader) ModelOption
WithMetadataLoader sets the MetadataLoader used to reload file lists on refresh.
func WithPatchLoader ¶
func WithPatchLoader(pl PatchLoader) ModelOption
WithPatchLoader sets the PatchLoader used to load file diffs on Enter.
type PatchLoadedMsg ¶
PatchLoadedMsg is sent when an async patch load completes.
Click to show internal directories.
Click to hide internal directories.