Documentation
¶
Index ¶
- type Model
- func (m *Model) Blur()
- func (m *Model) Focus()
- func (m *Model) Focused() bool
- func (m *Model) Init() tea.Cmd
- func (m *Model) SetGitStatus(status *git.StatusResult)
- func (m *Model) SetShowKeymapHints(show bool)
- func (m *Model) SetSize(width, height int)
- func (m *Model) SetStyles(styles common.Styles)
- func (m *Model) SetWorktree(wt *data.Worktree)
- func (m *Model) Update(msg tea.Msg) (*Model, tea.Cmd)
- func (m *Model) View() string
- type SelectionState
- type SidebarTerminalCreated
- type TerminalModel
- func (m *TerminalModel) AddTerminalForHarness(wt *data.Worktree)
- func (m *TerminalModel) Blur()
- func (m *TerminalModel) CloseAll()
- func (m *TerminalModel) CloseTerminal(wtID string)
- func (m *TerminalModel) CopyModeActive() bool
- func (m *TerminalModel) EnterCopyMode()
- func (m *TerminalModel) ExitCopyMode()
- func (m *TerminalModel) Focus()
- func (m *TerminalModel) Focused() bool
- func (m *TerminalModel) HandleTerminalCreated(wtID string, term *pty.Terminal) tea.Cmd
- func (m *TerminalModel) HelpLines(width int) []string
- func (m *TerminalModel) Init() tea.Cmd
- func (m *TerminalModel) SendToTerminal(s string)
- func (m *TerminalModel) SetOffset(x, y int)
- func (m *TerminalModel) SetShowKeymapHints(show bool)
- func (m *TerminalModel) SetSize(width, height int)
- func (m *TerminalModel) SetStyles(styles common.Styles)
- func (m *TerminalModel) SetWorktree(wt *data.Worktree) tea.Cmd
- func (m *TerminalModel) StatusLine() string
- func (m *TerminalModel) TerminalLayer() *compositor.VTermLayer
- func (m *TerminalModel) TerminalOrigin() (int, int)
- func (m *TerminalModel) TerminalSize() (int, int)
- func (m *TerminalModel) Update(msg tea.Msg) (*TerminalModel, tea.Cmd)
- func (m *TerminalModel) View() string
- func (m *TerminalModel) WriteToTerminal(data []byte)
- type TerminalState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubbletea model for the sidebar pane
func (*Model) SetGitStatus ¶
func (m *Model) SetGitStatus(status *git.StatusResult)
SetGitStatus sets the git status
func (*Model) SetShowKeymapHints ¶
SetShowKeymapHints controls whether helper text is rendered.
func (*Model) SetWorktree ¶
SetWorktree sets the active worktree
type SelectionState ¶
SelectionState tracks mouse selection state
type SidebarTerminalCreated ¶
SidebarTerminalCreated is a message for terminal creation
type TerminalModel ¶
type TerminalModel struct {
// contains filtered or unexported fields
}
TerminalModel is the Bubbletea model for the sidebar terminal section
func NewTerminalModel ¶
func NewTerminalModel() *TerminalModel
NewTerminalModel creates a new sidebar terminal model
func (*TerminalModel) AddTerminalForHarness ¶
func (m *TerminalModel) AddTerminalForHarness(wt *data.Worktree)
AddTerminalForHarness creates a terminal state without a PTY for benchmarks/tests.
func (*TerminalModel) CloseTerminal ¶
func (m *TerminalModel) CloseTerminal(wtID string)
CloseTerminal closes the terminal for the given worktree
func (*TerminalModel) CopyModeActive ¶
func (m *TerminalModel) CopyModeActive() bool
CopyModeActive returns whether the current terminal is in copy mode
func (*TerminalModel) EnterCopyMode ¶
func (m *TerminalModel) EnterCopyMode()
EnterCopyMode enters copy/scroll mode for the current terminal
func (*TerminalModel) ExitCopyMode ¶
func (m *TerminalModel) ExitCopyMode()
ExitCopyMode exits copy/scroll mode for the current terminal
func (*TerminalModel) Focused ¶
func (m *TerminalModel) Focused() bool
Focused returns whether the terminal is focused
func (*TerminalModel) HandleTerminalCreated ¶
HandleTerminalCreated handles the terminal creation message
func (*TerminalModel) HelpLines ¶
func (m *TerminalModel) HelpLines(width int) []string
HelpLines returns the help lines for the given width, respecting visibility.
func (*TerminalModel) Init ¶
func (m *TerminalModel) Init() tea.Cmd
Init initializes the terminal model
func (*TerminalModel) SendToTerminal ¶
func (m *TerminalModel) SendToTerminal(s string)
SendToTerminal sends a string directly to the current terminal
func (*TerminalModel) SetOffset ¶
func (m *TerminalModel) SetOffset(x, y int)
SetOffset sets the absolute screen coordinates where the terminal starts
func (*TerminalModel) SetShowKeymapHints ¶
func (m *TerminalModel) SetShowKeymapHints(show bool)
SetShowKeymapHints controls whether helper text is rendered.
func (*TerminalModel) SetSize ¶
func (m *TerminalModel) SetSize(width, height int)
SetSize sets the terminal section size
func (*TerminalModel) SetStyles ¶
func (m *TerminalModel) SetStyles(styles common.Styles)
SetStyles updates the component's styles (for theme changes).
func (*TerminalModel) SetWorktree ¶
func (m *TerminalModel) SetWorktree(wt *data.Worktree) tea.Cmd
SetWorktree sets the active worktree and creates terminal if needed
func (*TerminalModel) StatusLine ¶
func (m *TerminalModel) StatusLine() string
StatusLine returns the status line for the active terminal.
func (*TerminalModel) TerminalLayer ¶
func (m *TerminalModel) TerminalLayer() *compositor.VTermLayer
TerminalLayer returns a VTermLayer for the active worktree terminal.
func (*TerminalModel) TerminalOrigin ¶
func (m *TerminalModel) TerminalOrigin() (int, int)
TerminalOrigin returns the absolute origin for terminal rendering.
func (*TerminalModel) TerminalSize ¶
func (m *TerminalModel) TerminalSize() (int, int)
TerminalSize returns the terminal render size.
func (*TerminalModel) Update ¶
func (m *TerminalModel) Update(msg tea.Msg) (*TerminalModel, tea.Cmd)
Update handles messages
func (*TerminalModel) View ¶
func (m *TerminalModel) View() string
View renders the terminal section
func (*TerminalModel) WriteToTerminal ¶
func (m *TerminalModel) WriteToTerminal(data []byte)
WriteToTerminal writes bytes to the active terminal while holding the lock.
type TerminalState ¶
type TerminalState struct {
Terminal *pty.Terminal
VTerm *vterm.VTerm
Running bool
CopyMode bool // Whether in copy/scroll mode (keys not sent to PTY)
CopyState common.CopyState
// Selection state
Selection SelectionState
// contains filtered or unexported fields
}
TerminalState holds the terminal state for a worktree