Documentation
¶
Index ¶
- type DetailModel
- func (m *DetailModel) GetChangedFiles() []azdevops.IterationChange
- func (m *DetailModel) GetContextItems() []components.ContextItem
- func (m *DetailModel) GetPR() azdevops.PullRequest
- func (m *DetailModel) GetScrollPercent() float64
- func (m *DetailModel) GetStatusMessage() string
- func (m *DetailModel) GetThreads() []azdevops.Thread
- func (m *DetailModel) Init() tea.Cmd
- func (m *DetailModel) MoveDown()
- func (m *DetailModel) MoveUp()
- func (m *DetailModel) PageDown()
- func (m *DetailModel) PageUp()
- func (m *DetailModel) SelectedFile() *azdevops.IterationChange
- func (m *DetailModel) SelectedIndex() int
- func (m *DetailModel) SetChangedFiles(files []azdevops.IterationChange)
- func (m *DetailModel) SetSize(width, height int)
- func (m *DetailModel) SetThreads(threads []azdevops.Thread)
- func (m *DetailModel) Update(msg tea.Msg) (*DetailModel, tea.Cmd)
- func (m *DetailModel) View() string
- type DiffModel
- func (m *DiffModel) GetContextItems() []components.ContextItem
- func (m *DiffModel) GetScrollPercent() float64
- func (m *DiffModel) GetStatusMessage() string
- func (m *DiffModel) Init() tea.Cmd
- func (m *DiffModel) InitGeneralComments() tea.Cmd
- func (m *DiffModel) InitWithFile(file azdevops.IterationChange) tea.Cmd
- func (m *DiffModel) IsInputActive() bool
- func (m *DiffModel) SetSize(width, height int)
- func (m *DiffModel) Update(msg tea.Msg) (*DiffModel, tea.Cmd)
- func (m *DiffModel) View() string
- type DiffViewMode
- type InputMode
- type Model
- func (m Model) GetContextItems() []components.ContextItem
- func (m Model) GetScrollPercent() float64
- func (m Model) GetStatusMessage() string
- func (m Model) GetViewMode() ViewMode
- func (m Model) HasContextBar() bool
- func (m Model) Init() tea.Cmd
- func (m Model) IsAsReviewerActive() bool
- func (m Model) IsMyPRsActive() bool
- func (m Model) IsSearching() bool
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type SetPRsMsg
- type ViewMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetailModel ¶
type DetailModel struct {
// contains filtered or unexported fields
}
DetailModel represents the PR detail view showing description, reviewers, and changed files
func NewDetailModel ¶
func NewDetailModel(client *azdevops.Client, pr azdevops.PullRequest) *DetailModel
NewDetailModel creates a new PR detail model with default styles
func NewDetailModelWithStyles ¶
func NewDetailModelWithStyles(client *azdevops.Client, pr azdevops.PullRequest, s *styles.Styles) *DetailModel
NewDetailModelWithStyles creates a new PR detail model with custom styles
func (*DetailModel) GetChangedFiles ¶
func (m *DetailModel) GetChangedFiles() []azdevops.IterationChange
GetChangedFiles returns the changed files
func (*DetailModel) GetContextItems ¶
func (m *DetailModel) GetContextItems() []components.ContextItem
GetContextItems returns context items for the detail view
func (*DetailModel) GetPR ¶
func (m *DetailModel) GetPR() azdevops.PullRequest
GetPR returns the pull request
func (*DetailModel) GetScrollPercent ¶
func (m *DetailModel) GetScrollPercent() float64
GetScrollPercent returns the scroll percentage based on viewport position
func (*DetailModel) GetStatusMessage ¶
func (m *DetailModel) GetStatusMessage() string
GetStatusMessage returns the status message
func (*DetailModel) GetThreads ¶
func (m *DetailModel) GetThreads() []azdevops.Thread
GetThreads returns the current threads (for passing to DiffModel)
func (*DetailModel) MoveDown ¶
func (m *DetailModel) MoveDown()
MoveDown moves file selection down or scrolls viewport if at bottom
func (*DetailModel) MoveUp ¶
func (m *DetailModel) MoveUp()
MoveUp moves file selection up or scrolls viewport if at top
func (*DetailModel) PageDown ¶
func (m *DetailModel) PageDown()
PageDown scrolls the viewport down by one page
func (*DetailModel) PageUp ¶
func (m *DetailModel) PageUp()
PageUp scrolls the viewport up by one page
func (*DetailModel) SelectedFile ¶
func (m *DetailModel) SelectedFile() *azdevops.IterationChange
SelectedFile returns the currently selected changed file
func (*DetailModel) SelectedIndex ¶
func (m *DetailModel) SelectedIndex() int
SelectedIndex returns the current file selection index
func (*DetailModel) SetChangedFiles ¶
func (m *DetailModel) SetChangedFiles(files []azdevops.IterationChange)
SetChangedFiles sets the changed files (useful for testing)
func (*DetailModel) SetSize ¶
func (m *DetailModel) SetSize(width, height int)
SetSize sets the size of the detail view
func (*DetailModel) SetThreads ¶
func (m *DetailModel) SetThreads(threads []azdevops.Thread)
SetThreads sets the threads (useful for testing) Filters out system-generated threads
func (*DetailModel) Update ¶
func (m *DetailModel) Update(msg tea.Msg) (*DetailModel, tea.Cmd)
Update handles messages for the detail view
type DiffModel ¶
type DiffModel struct {
// contains filtered or unexported fields
}
DiffModel is the diff viewer component
func NewDiffModel ¶
func NewDiffModel(client *azdevops.Client, pr azdevops.PullRequest, threads []azdevops.Thread, s *styles.Styles) *DiffModel
NewDiffModel creates a new diff viewer model
func (*DiffModel) GetContextItems ¶
func (m *DiffModel) GetContextItems() []components.ContextItem
GetContextItems returns context items for the current view
func (*DiffModel) GetScrollPercent ¶
GetScrollPercent returns the scroll percentage
func (*DiffModel) GetStatusMessage ¶
GetStatusMessage returns the status message
func (*DiffModel) InitGeneralComments ¶
InitGeneralComments initializes the diff model and immediately opens the general comments view
func (*DiffModel) InitWithFile ¶
func (m *DiffModel) InitWithFile(file azdevops.IterationChange) tea.Cmd
InitWithFile initializes the diff model and immediately opens a specific file's diff
func (*DiffModel) IsInputActive ¶
IsInputActive returns true when a text input (comment or reply) is active, so that global keyboard shortcuts can be suppressed.
type DiffViewMode ¶
type DiffViewMode int
DiffViewMode represents the current sub-view within the diff viewer
const ( DiffFileList DiffViewMode = iota // selectable list of changed files DiffFileView // scrollable diff for single file )
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the pull request list view with sub-views
func NewModel ¶
func NewModel(client *azdevops.MultiClient) Model
NewModel creates a new pull request list model with default styles
func NewModelWithStyles ¶
func NewModelWithStyles(client *azdevops.MultiClient, s *styles.Styles) Model
NewModelWithStyles creates a new pull request list model with custom styles
func (Model) GetContextItems ¶
func (m Model) GetContextItems() []components.ContextItem
GetContextItems returns context bar items for the current view
func (Model) GetScrollPercent ¶
GetScrollPercent returns the scroll percentage for the current view
func (Model) GetStatusMessage ¶
GetStatusMessage returns the status message for the current view
func (Model) GetViewMode ¶
GetViewMode returns the current view mode (for testing)
func (Model) HasContextBar ¶
HasContextBar returns true if the current view should show a context bar
func (Model) IsAsReviewerActive ¶ added in v0.5.4
IsAsReviewerActive returns true if the "as reviewer" filter is active.
func (Model) IsMyPRsActive ¶ added in v0.5.4
IsMyPRsActive returns true if the "my PRs" filter is active.
func (Model) IsSearching ¶
IsSearching returns true if the view has an active text input that should suppress global keyboard shortcuts. This includes search/filter mode and comment/reply input in the diff view.
type SetPRsMsg ¶
type SetPRsMsg struct {
PRs []azdevops.PullRequest
}
SetPRsMsg is a message to directly set the pull requests (from polling)