filepicker

package
v0.0.0-...-6d55746 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseMsg

type CloseMsg struct{}

CloseMsg is sent when the file picker should close

type FileSelectedMsg

type FileSelectedMsg struct {
	File *git.ChangedFile
}

FileSelectedMsg is sent when a file is selected

type Model

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

Model represents the file picker overlay

func New

func New() Model

New creates a new file picker model

func (*Model) Close

func (m *Model) Close()

Close deactivates the file picker

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model

func (Model) IsActive

func (m Model) IsActive() bool

IsActive returns whether the picker is active

func (*Model) Open

func (m *Model) Open()

Open activates the file picker

func (Model) RenderOverlay

func (m Model) RenderOverlay(background string) string

RenderOverlay renders the file picker on top of a background

func (*Model) SetFiles

func (m *Model) SetFiles(files []git.ChangedFile)

SetFiles sets the list of files

func (*Model) SetRepo

func (m *Model) SetRepo(repo *git.Repo, baseBranch string)

SetRepo sets the repo for loading diffs

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize sets the overlay dimensions

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

Update implements tea.Model

func (Model) View

func (m Model) View() string

View returns empty - use RenderOverlay instead

Jump to

Keyboard shortcuts

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