Documentation
¶
Index ¶
- type CloseCommitViewMsg
- type CommitDataLoadedMsg
- type KeyMap
- type Model
- func (m Model) CommitID() string
- func (m Model) Done() bool
- func (m Model) Init() tea.Cmd
- func (m *Model) SetOverlayMode(overlay bool)
- func (m *Model) SetSize(width, height int)
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) UpdateCommit(commitID string, filter []string) tea.Cmd
- func (m Model) View() string
- type OpenCommitViewMsg
- type OpenFileMsg
- type OpenURLMsg
- type ScrollCommitViewMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloseCommitViewMsg ¶
type CloseCommitViewMsg struct{}
CloseCommitViewMsg is sent when the commit view should be closed.
type CommitDataLoadedMsg ¶
type CommitDataLoadedMsg struct {
Info *git.LogEntry
Overview *git.CommitOverview
Signature *git.CommitSignature
Diffs []git.FileDiff
Err error
}
CommitDataLoadedMsg is sent when commit data has been loaded.
type KeyMap ¶
type KeyMap struct {
// Navigation
MoveDown key.Binding
MoveUp key.Binding
PageDown key.Binding
PageUp key.Binding
HalfPageDown key.Binding
HalfPageUp key.Binding
GoToTop key.Binding
GoToBottom key.Binding
PrevHunkHeader key.Binding
NextHunkHeader key.Binding
// Horizontal scroll
ScrollLeft key.Binding
ScrollRight key.Binding
ScrollStart key.Binding
ScrollEnd key.Binding
// Actions
OpenFileInWorktree key.Binding
OpenCommitLink key.Binding
YankSelected key.Binding
// Close
Close key.Binding
CloseEscape key.Binding
// Popup triggers (for future phases)
CherryPickPopup key.Binding
BranchPopup key.Binding
CommitPopup key.Binding
DiffPopup key.Binding
PushPopup key.Binding
RevertPopup key.Binding
RebasePopup key.Binding
ResetPopup key.Binding
BisectPopup key.Binding
TagPopup key.Binding
}
KeyMap defines key bindings for the commit view.
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
DefaultKeyMap returns the default key bindings for commit view.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the commit view model for displaying commit details.
func (*Model) SetOverlayMode ¶
SetOverlayMode sets whether the view is rendered as a split overlay.
func (*Model) UpdateCommit ¶
UpdateCommit changes to a different commit (singleton support).
type OpenCommitViewMsg ¶
type OpenCommitViewMsg struct {
CommitID string // commit hash or ref
Filter []string // optional file path filter
}
OpenCommitViewMsg triggers opening the commit view at the app level.
type OpenFileMsg ¶
OpenFileMsg requests opening a file in the worktree.
type OpenURLMsg ¶
type OpenURLMsg struct {
URL string
}
OpenURLMsg requests opening a URL in the browser.
type ScrollCommitViewMsg ¶
type ScrollCommitViewMsg struct {
Direction int // -1 up, +1 down
}
ScrollCommitViewMsg requests scrolling the commit view.