Documentation
¶
Index ¶
- Constants
- Variables
- func AdjustPreviewWidth(width int) int
- func GradientBar(width, filled int, startHex, endHex string) string
- func GradientText(text, startHex, endHex string) string
- func IsUngroupedID(id string) bool
- func RenderAutomationsList(automations []*config.Automation, selectedIdx int, width int, height int, ...) string
- func UngroupedRepoPath(id string) string
- type AutomationForm
- type AutomationRepoOption
- type DiffPane
- func (d *DiffPane) AddComment(file string, line int, marker, code, comment string)
- func (d *DiffPane) ClearComments()
- func (d *DiffPane) CommentCursorDown()
- func (d *DiffPane) CommentCursorUp()
- func (d *DiffPane) EnterCommentMode()
- func (d *DiffPane) ExitCommentMode()
- func (d *DiffPane) FileDown()
- func (d *DiffPane) FileUp()
- func (d *DiffPane) FormatCommentsMessage() string
- func (d *DiffPane) GetComments() map[string][]LineComment
- func (d *DiffPane) GetCursorLineInfo() (file, marker, code string, lineIdx int)
- func (d *DiffPane) GetSelectedFilePath() string
- func (d *DiffPane) HasComments() bool
- func (d *DiffPane) HasFiles() bool
- func (d *DiffPane) IsCommentMode() bool
- func (d *DiffPane) ScrollDown()
- func (d *DiffPane) ScrollUp()
- func (d *DiffPane) SetDiff(instance *session.Instance)
- func (d *DiffPane) SetSize(width, height int)
- func (d *DiffPane) String() string
- type GitPane
- func (g *GitPane) Attach(worktreePath, instanceTitle string)
- func (g *GitPane) Detach()
- func (g *GitPane) IsRunning() bool
- func (g *GitPane) Kill()
- func (g *GitPane) KillSession(instanceTitle string)
- func (g *GitPane) NeedsRespawn(instanceTitle string) bool
- func (g *GitPane) Render() (string, bool)
- func (g *GitPane) SendKey(data []byte) error
- func (g *GitPane) SetSize(width, height int)
- func (g *GitPane) String() string
- func (g *GitPane) WaitForRender(timeout time.Duration)
- type InstanceRenderer
- type LineComment
- type List
- func (l *List) AddInstance(instance *session.Instance) (finalize func())
- func (l *List) Attach() (chan struct{}, error)
- func (l *List) Clear()
- func (l *List) CycleSortMode()
- func (l *List) Down()
- func (l *List) GetInstances() []*session.Instance
- func (l *List) GetItemAtRow(row int) int
- func (l *List) GetSelectedIdx() int
- func (l *List) GetSelectedInstance() *session.Instance
- func (l *List) GetSortMode() SortMode
- func (l *List) GetStatusFilter() StatusFilter
- func (l *List) HandleTabClick(localX, localY int) (StatusFilter, bool)
- func (l *List) HeaderHeight() int
- func (l *List) IsExpanded(title string) bool
- func (l *List) Kill()
- func (l *List) KillInstanceByTitle(title string)
- func (l *List) KillInstancesByTopic(topicName string)
- func (l *List) NumInstances() int
- func (l *List) ScrollDown(n int)
- func (l *List) ScrollUp(n int)
- func (l *List) SelectInstanceByRef(instance *session.Instance)
- func (l *List) SetFilter(topicFilter string)
- func (l *List) SetFilterByRepoAndTopic(topicFilter, repoPath string)
- func (l *List) SetFocused(focused bool)
- func (l *List) SetSearchFilter(query string)
- func (l *List) SetSearchFilterWithTopic(query string, topicFilter string)
- func (l *List) SetSearchFilterWithTopicAndRepo(query string, topicFilter string, repoPath string)
- func (l *List) SetSelectedInstance(idx int)
- func (l *List) SetSessionPreviewSize(width, height int) (err error)
- func (l *List) SetSize(width, height int)
- func (l *List) SetStatusFilter(filter StatusFilter)
- func (l *List) String() string
- func (l *List) ToggleChildExpanded() bool
- func (l *List) ToggleExpanded() bool
- func (l *List) TotalInstances() int
- func (l *List) Up()
- type MemoryBrowser
- func (b *MemoryBrowser) CancelEdit()
- func (b *MemoryBrowser) Close()
- func (b *MemoryBrowser) Content() string
- func (b *MemoryBrowser) DeleteSelected() error
- func (b *MemoryBrowser) EnterEditMode()
- func (b *MemoryBrowser) HandleKeyPress(msg tea.KeyMsg) (tea.Cmd, bool)
- func (b *MemoryBrowser) IsEditing() bool
- func (b *MemoryBrowser) PinSelected() error
- func (b *MemoryBrowser) Render() string
- func (b *MemoryBrowser) SaveEdit() error
- func (b *MemoryBrowser) ScrollDown(n int)
- func (b *MemoryBrowser) ScrollUp(n int)
- func (b *MemoryBrowser) SelectNext()
- func (b *MemoryBrowser) SelectPrev()
- func (b *MemoryBrowser) SelectedFile() string
- func (b *MemoryBrowser) SetEditContent(s string)
- func (b *MemoryBrowser) SetSize(width, height int)
- func (b *MemoryBrowser) UnpinSelected() error
- type Menu
- type MenuState
- type PreviewPane
- func (p *PreviewPane) ResetToNormalMode(instance *session.Instance) error
- func (p *PreviewPane) ScrollDown(instance *session.Instance) error
- func (p *PreviewPane) ScrollUp(instance *session.Instance) error
- func (p *PreviewPane) SetAsyncContent(content string)
- func (p *PreviewPane) SetRawContent(content string)
- func (p *PreviewPane) SetSize(width, maxHeight int)
- func (p *PreviewPane) String() string
- func (p *PreviewPane) UpdateContent(instance *session.Instance) error
- type RepoGroup
- type Sidebar
- func (s *Sidebar) ActivateSearch()
- func (s *Sidebar) ClickItem(row int)
- func (s *Sidebar) DeactivateSearch()
- func (s *Sidebar) Down()
- func (s *Sidebar) GetSearchQuery() string
- func (s *Sidebar) GetSelectedID() string
- func (s *Sidebar) GetSelectedIdx() int
- func (s *Sidebar) GetSelectedRepoPath() string
- func (s *Sidebar) IsFocused() bool
- func (s *Sidebar) IsRepoBtnHit(x, y, screenTop int) bool
- func (s *Sidebar) IsSearchActive() bool
- func (s *Sidebar) SelectFirst()
- func (s *Sidebar) SelectLast()
- func (s *Sidebar) SetFocused(focused bool)
- func (s *Sidebar) SetGroupedItems(groups []RepoGroup)
- func (s *Sidebar) SetItems(topicNames []string, instanceCountByTopic map[string]int, ungroupedCount int, ...)
- func (s *Sidebar) SetItemsWithAutomations(topicNames []string, instanceCountByTopic map[string]int, ungroupedCount int, ...)
- func (s *Sidebar) SetRepoHovered(hovered bool)
- func (s *Sidebar) SetRepoName(name string)
- func (s *Sidebar) SetRepoNames(names []string)
- func (s *Sidebar) SetSearchQuery(q string)
- func (s *Sidebar) SetSize(width, height int)
- func (s *Sidebar) String() string
- func (s *Sidebar) Up()
- func (s *Sidebar) UpdateMatchCounts(matchesByTopic map[string]int, totalMatches int)
- type SidebarItem
- type SortMode
- type StatusFilter
- type Tab
- type TabbedWindow
- func (w *TabbedWindow) ApplyPreviewContent(content string)
- func (w *TabbedWindow) ClearContentStale()
- func (w *TabbedWindow) ContentScrollDown()
- func (w *TabbedWindow) ContentScrollUp()
- func (w *TabbedWindow) GetActiveTab() int
- func (w *TabbedWindow) GetDiffPane() *DiffPane
- func (w *TabbedWindow) GetGitPane() *GitPane
- func (w *TabbedWindow) GetPreviewSize() (width, height int)
- func (w *TabbedWindow) GetTerminalPane() *TerminalPane
- func (w *TabbedWindow) HandleTabClick(localX, localY int) bool
- func (w *TabbedWindow) IsContentStale() bool
- func (w *TabbedWindow) IsFocusMode() bool
- func (w *TabbedWindow) IsInDiffTab() bool
- func (w *TabbedWindow) IsInGitTab() bool
- func (w *TabbedWindow) IsInTerminalTab() bool
- func (w *TabbedWindow) IsPreviewInScrollMode() bool
- func (w *TabbedWindow) MarkContentStale()
- func (w *TabbedWindow) ResetPreviewToNormalMode(instance *session.Instance) error
- func (w *TabbedWindow) ScrollDown()
- func (w *TabbedWindow) ScrollUp()
- func (w *TabbedWindow) SetActiveTab(tab int)
- func (w *TabbedWindow) SetFocusMode(enabled bool)
- func (w *TabbedWindow) SetGitContent(content string)
- func (w *TabbedWindow) SetInstance(instance *session.Instance)
- func (w *TabbedWindow) SetPreviewContent(content string)
- func (w *TabbedWindow) SetSize(width, height int)
- func (w *TabbedWindow) SetTerminalContent(content string)
- func (w *TabbedWindow) String() string
- func (w *TabbedWindow) Toggle()
- func (w *TabbedWindow) ToggleWithReset(instance *session.Instance) error
- func (w *TabbedWindow) UpdateDiff(instance *session.Instance)
- func (w *TabbedWindow) UpdatePreview(instance *session.Instance) error
- type TerminalPane
- func (t *TerminalPane) Attach(worktreePath, instanceTitle string)
- func (t *TerminalPane) CurrentInstance() string
- func (t *TerminalPane) Detach()
- func (t *TerminalPane) IsAttached() bool
- func (t *TerminalPane) Kill()
- func (t *TerminalPane) KillSession(instanceTitle string)
- func (t *TerminalPane) Render() (string, bool)
- func (t *TerminalPane) SendKey(data []byte) error
- func (t *TerminalPane) SetSize(width, height int)
- func (t *TerminalPane) String() string
- func (t *TerminalPane) WaitForRender(timeout time.Duration)
- type TopicNotesWindow
- func (w *TopicNotesWindow) GetActiveTab() int
- func (w *TopicNotesWindow) GetTasks() []session.TopicTask
- func (w *TopicNotesWindow) HandleTabClick(localX, localY int) bool
- func (w *TopicNotesWindow) IsInNotesTab() bool
- func (w *TopicNotesWindow) IsInTasksTab() bool
- func (w *TopicNotesWindow) SelectedTask() int
- func (w *TopicNotesWindow) SetActiveTab(tab int)
- func (w *TopicNotesWindow) SetNotes(notes string)
- func (w *TopicNotesWindow) SetSize(width, height int)
- func (w *TopicNotesWindow) SetTasks(tasks []session.TopicTask)
- func (w *TopicNotesWindow) String() string
- func (w *TopicNotesWindow) TaskCount() int
- func (w *TopicNotesWindow) TaskDown()
- func (w *TopicNotesWindow) TaskUp()
- func (w *TopicNotesWindow) Toggle()
- type TopicStatus
Constants ¶
const ( SidebarAll = "__all__" SidebarUngrouped = "__ungrouped__" SidebarAutomations = "__automations__" )
const ( PreviewTab int = iota TerminalTab // persistent shell per instance DiffTab GitTab )
const ( TopicTabNotes int = iota TopicTabTasks )
const ( // AutomationsListWidth is the outer rendered width of the modal (table + padding + border). AutomationsListWidth = autoTableWidth + 4 + 2 // 77 (padding=2*2, border=2*1) )
Column widths for the automations table (visual terminal columns).
Variables ¶
var ( AdditionStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#22c55e")) DeletionStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#ef4444")) HunkStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#0ea5e9")) )
var FallBackText = lipgloss.JoinVertical(lipgloss.Center, GradientText(padLines(beeBannerRaw), "#F0A868", "#E0C070"), "", GradientText(fallbackBannerRaw, "#F0A868", "#7EC8D8"))
Functions ¶
func AdjustPreviewWidth ¶
AdjustPreviewWidth returns the tab row width for the given allocation. The window's border+padding is handled by windowStyle.
func GradientBar ¶
GradientBar renders a progress bar of `width` characters with `filled` filled blocks. Filled portion uses a gradient from startHex to endHex; unfilled uses dim blocks.
func GradientText ¶
GradientText renders a string with a left-to-right truecolor gradient from startHex to endHex. Newlines are preserved; ANSI reset appended.
func IsUngroupedID ¶ added in v0.2.1
IsUngroupedID checks if an ID represents an ungrouped item (single or per-repo).
func RenderAutomationsList ¶ added in v0.2.2
func RenderAutomationsList(automations []*config.Automation, selectedIdx int, width int, height int, form *AutomationForm) string
RenderAutomationsList renders the automations manager as a modal. When form is non-nil the create/edit form is shown instead of the list.
func UngroupedRepoPath ¶ added in v0.2.1
UngroupedRepoPath extracts the repo path from a per-repo ungrouped ID. Returns empty string for the plain SidebarUngrouped ID.
Types ¶
type AutomationForm ¶ added in v0.2.2
type AutomationForm struct {
Submitted bool
Canceled bool
IsEditing bool
// contains filtered or unexported fields
}
AutomationForm is an inline multi-field form for creating or editing automations. All key fields are visible and editable in a single screen.
func NewAutomationForm ¶ added in v0.2.2
func NewAutomationForm( name, schedule, instructions, agent, repoPath string, agentOptions []string, repoOptions []AutomationRepoOption, isEditing bool, ) *AutomationForm
NewAutomationForm creates a form pre-populated with the given values. Set isEditing=false for a new automation (empty values), true for edit.
func (*AutomationForm) GetValues ¶ added in v0.2.2
func (f *AutomationForm) GetValues() (name, schedule, instructions, agent, repoPath string)
GetValues returns the current field values.
func (*AutomationForm) HandleKey ¶ added in v0.2.2
func (f *AutomationForm) HandleKey(msg tea.KeyMsg) bool
HandleKey processes a key event. Returns true when the form should close.
func (*AutomationForm) Render ¶ added in v0.2.2
func (f *AutomationForm) Render(width, height int) string
Render draws the form at the given inner width and height.
type AutomationRepoOption ¶ added in v0.2.2
AutomationRepoOption describes a selectable project in the automation form.
type DiffPane ¶
type DiffPane struct {
// contains filtered or unexported fields
}
func NewDiffPane ¶
func NewDiffPane() *DiffPane
func (*DiffPane) AddComment ¶ added in v0.2.2
AddComment adds a comment annotation to the given file at the given line index.
func (*DiffPane) ClearComments ¶ added in v0.2.2
func (d *DiffPane) ClearComments()
ClearComments removes all stored comments.
func (*DiffPane) CommentCursorDown ¶ added in v0.2.2
func (d *DiffPane) CommentCursorDown()
CommentCursorDown moves the comment cursor down one line.
func (*DiffPane) CommentCursorUp ¶ added in v0.2.2
func (d *DiffPane) CommentCursorUp()
CommentCursorUp moves the comment cursor up one line.
func (*DiffPane) EnterCommentMode ¶ added in v0.2.2
func (d *DiffPane) EnterCommentMode()
EnterCommentMode enters comment mode, resetting the cursor to line 0.
func (*DiffPane) ExitCommentMode ¶ added in v0.2.2
func (d *DiffPane) ExitCommentMode()
ExitCommentMode exits comment mode.
func (*DiffPane) FormatCommentsMessage ¶ added in v0.2.2
FormatCommentsMessage formats all comments as a structured prompt message suitable for injection into the agent's terminal.
func (*DiffPane) GetComments ¶ added in v0.2.2
func (d *DiffPane) GetComments() map[string][]LineComment
GetComments returns all stored comments, keyed by file path.
func (*DiffPane) GetCursorLineInfo ¶ added in v0.2.2
GetCursorLineInfo returns the file, marker, and code for the current cursor line. Returns empty strings if line is not a diff line (e.g. hunk header).
func (*DiffPane) GetSelectedFilePath ¶ added in v0.2.1
GetSelectedFilePath returns the relative path of the currently selected file, or empty string if no specific file is selected (e.g. "All" is selected).
func (*DiffPane) HasComments ¶ added in v0.2.2
HasComments returns true if there is at least one comment stored.
func (*DiffPane) IsCommentMode ¶ added in v0.2.2
IsCommentMode returns true when comment mode is active.
func (*DiffPane) ScrollDown ¶
func (d *DiffPane) ScrollDown()
type GitPane ¶
type GitPane struct {
// contains filtered or unexported fields
}
GitPane manages a lazygit tmux session that persists across tab switches. When the user switches tabs (git → agent → git), the tmux session stays alive and only the EmbeddedTerminal PTY is reconnected — preserving lazygit's UI state. When switching instances, the old session is killed to avoid accumulating background lazygit processes (each runs file watchers and periodic git polls).
func (*GitPane) Attach ¶ added in v0.2.1
Attach creates a lazygit tmux session for the instance (if needed) and connects an EmbeddedTerminal to it. If already attached to a different instance, detaches first.
func (*GitPane) Detach ¶ added in v0.2.1
func (g *GitPane) Detach()
Detach closes the EmbeddedTerminal but keeps the tmux session alive.
func (*GitPane) Kill ¶
func (g *GitPane) Kill()
Kill detaches and kills ALL lazygit tmux sessions (app shutdown).
func (*GitPane) KillSession ¶ added in v0.2.1
KillSession kills a single instance's lazygit tmux session.
func (*GitPane) NeedsRespawn ¶
NeedsRespawn returns true if the current instance differs from what's running.
func (*GitPane) SendKey ¶
SendKey forwards raw key bytes to the lazygit PTY via the embedded terminal. If the write fails (e.g. lazygit exited), it cleans up the dead session.
func (*GitPane) WaitForRender ¶ added in v0.2.1
WaitForRender blocks until the embedded terminal has new content or the timeout elapses.
type InstanceRenderer ¶
type InstanceRenderer struct {
// contains filtered or unexported fields
}
InstanceRenderer handles rendering of session.Instance objects
type LineComment ¶ added in v0.2.2
type LineComment struct {
File string // relative file path
Line int // 0-based index into the rendered diff content
Marker string // "+", "-", or " "
Code string // the line being commented on (trimmed)
Comment string // user's comment text
}
LineComment is an annotation attached to a specific line in the diff.
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) AddInstance ¶
AddInstance adds a new instance to the list. It returns a finalizer function that should be called when the instance is started. If the instance was restored from storage or is paused, you can call the finalizer immediately. When creating a new one and entering the name, you want to call the finalizer once the name is done.
func (*List) CycleSortMode ¶
func (l *List) CycleSortMode()
CycleSortMode advances to the next sort mode and rebuilds.
func (*List) GetInstances ¶
GetInstances returns all instances (unfiltered) for persistence and metadata updates.
func (*List) GetItemAtRow ¶
GetItemAtRow maps a visible row offset (relative to the first item in the viewport) to an item index, accounting for the current scroll position. Returns -1 if the row doesn't correspond to any item.
func (*List) GetSelectedIdx ¶
GetSelectedIdx returns the index of the currently selected item in the filtered list.
func (*List) GetSelectedInstance ¶
GetSelectedInstance returns the currently selected instance
func (*List) GetSortMode ¶
GetSortMode returns the current sort mode.
func (*List) GetStatusFilter ¶
func (l *List) GetStatusFilter() StatusFilter
GetStatusFilter returns the current status filter.
func (*List) HandleTabClick ¶
func (l *List) HandleTabClick(localX, localY int) (StatusFilter, bool)
HandleTabClick checks if a click at the given local coordinates (relative to the list's top-left corner) hits a filter tab. Returns the filter and true if a tab was clicked, or false if the click was outside the tab area.
func (*List) HeaderHeight ¶ added in v0.2.2
HeaderHeight returns the number of rows consumed by the fixed header (blank line + filter tabs + blank line).
func (*List) IsExpanded ¶ added in v0.2.1
IsExpanded returns whether the given instance title has its sub-agent tree expanded.
func (*List) KillInstanceByTitle ¶ added in v0.2.1
KillInstanceByTitle kills and removes a single instance by its title.
func (*List) KillInstancesByTopic ¶
KillInstancesByTopic kills and removes all instances belonging to the given topic.
func (*List) NumInstances ¶
func (*List) ScrollDown ¶ added in v0.2.2
ScrollDown scrolls the item area down by n rows.
func (*List) SelectInstanceByRef ¶ added in v0.2.1
SelectInstanceByRef finds an instance by pointer in the filtered list and selects it.
func (*List) SetFilter ¶
SetFilter filters the displayed instances by topic name. Empty string shows all. SidebarUngrouped shows only ungrouped instances.
func (*List) SetFilterByRepoAndTopic ¶ added in v0.2.1
SetFilterByRepoAndTopic filters instances by both topic and repo path.
func (*List) SetFocused ¶
func (*List) SetSearchFilter ¶
SetSearchFilter filters instances by search query across all topics.
func (*List) SetSearchFilterWithTopic ¶
SetSearchFilterWithTopic filters instances by search query, optionally scoped to a topic. topicFilter: "" = all topics, "__ungrouped__" = ungrouped only, otherwise = specific topic.
func (*List) SetSearchFilterWithTopicAndRepo ¶ added in v0.2.1
SetSearchFilterWithTopicAndRepo filters instances by search query, topic, and optionally repo.
func (*List) SetSelectedInstance ¶
SetSelectedInstance sets the selected index. Noop if the index is out of bounds.
func (*List) SetSessionPreviewSize ¶
SetSessionPreviewSize sets the height and width for the tmux sessions. This makes the stdout line have the correct width and height.
func (*List) SetStatusFilter ¶
func (l *List) SetStatusFilter(filter StatusFilter)
SetStatusFilter sets the status filter and rebuilds the filtered items.
func (*List) ToggleChildExpanded ¶ added in v0.2.1
ToggleChildExpanded toggles whether brain-spawned children of the selected instance are shown.
func (*List) ToggleExpanded ¶ added in v0.2.1
ToggleExpanded toggles the sub-agent tree for the currently selected instance. It first tries tmux sub-agents, then brain-spawned children. Returns true if the toggle was meaningful.
func (*List) TotalInstances ¶
TotalInstances returns the total number of instances regardless of filter.
type MemoryBrowser ¶ added in v0.2.2
type MemoryBrowser struct {
// contains filtered or unexported fields
}
MemoryBrowser is a full-screen split-pane memory file viewer and editor.
func NewMemoryBrowser ¶ added in v0.2.2
func NewMemoryBrowser(mgr *memory.Manager) (*MemoryBrowser, error)
NewMemoryBrowser creates a MemoryBrowser backed by the given manager. It immediately loads the file list and auto-selects the first file.
func (*MemoryBrowser) CancelEdit ¶ added in v0.2.2
func (b *MemoryBrowser) CancelEdit()
CancelEdit discards changes and returns to browse mode.
func (*MemoryBrowser) Close ¶ added in v0.2.2
func (b *MemoryBrowser) Close()
Close releases any cached repo-scoped managers opened by the browser.
func (*MemoryBrowser) Content ¶ added in v0.2.2
func (b *MemoryBrowser) Content() string
Content returns the body of the currently loaded file (frontmatter stripped).
func (*MemoryBrowser) DeleteSelected ¶ added in v0.2.2
func (b *MemoryBrowser) DeleteSelected() error
DeleteSelected deletes the selected file via the Manager.
func (*MemoryBrowser) EnterEditMode ¶ added in v0.2.2
func (b *MemoryBrowser) EnterEditMode()
EnterEditMode switches the right pane into an editable textarea.
func (*MemoryBrowser) HandleKeyPress ¶ added in v0.2.2
HandleKeyPress processes one key event. Returns (cmd, close): close=true means the caller should exit this screen.
func (*MemoryBrowser) IsEditing ¶ added in v0.2.2
func (b *MemoryBrowser) IsEditing() bool
IsEditing returns true when the right pane is in edit mode.
func (*MemoryBrowser) PinSelected ¶ added in v0.2.2
func (b *MemoryBrowser) PinSelected() error
PinSelected moves the selected file into system/ (always-in-context).
func (*MemoryBrowser) Render ¶ added in v0.2.2
func (b *MemoryBrowser) Render() string
Render returns the full lipgloss-styled string for the browser.
func (*MemoryBrowser) SaveEdit ¶ added in v0.2.2
func (b *MemoryBrowser) SaveEdit() error
SaveEdit writes the textarea content via the Manager and re-indexes.
func (*MemoryBrowser) ScrollDown ¶ added in v0.2.2
func (b *MemoryBrowser) ScrollDown(n int)
ScrollDown scrolls the content pane down by n lines.
func (*MemoryBrowser) ScrollUp ¶ added in v0.2.2
func (b *MemoryBrowser) ScrollUp(n int)
ScrollUp scrolls the content pane up by n lines.
func (*MemoryBrowser) SelectNext ¶ added in v0.2.2
func (b *MemoryBrowser) SelectNext()
SelectNext moves selection down one file.
func (*MemoryBrowser) SelectPrev ¶ added in v0.2.2
func (b *MemoryBrowser) SelectPrev()
SelectPrev moves selection up one file.
func (*MemoryBrowser) SelectedFile ¶ added in v0.2.2
func (b *MemoryBrowser) SelectedFile() string
SelectedFile returns the relative path of the currently selected file.
func (*MemoryBrowser) SetEditContent ¶ added in v0.2.2
func (b *MemoryBrowser) SetEditContent(s string)
SetEditContent sets the textarea value (used in tests).
func (*MemoryBrowser) SetSize ¶ added in v0.2.2
func (b *MemoryBrowser) SetSize(width, height int)
SetSize updates the component dimensions.
func (*MemoryBrowser) UnpinSelected ¶ added in v0.2.2
func (b *MemoryBrowser) UnpinSelected() error
UnpinSelected moves the selected file out of system/ back to root.
type Menu ¶
type Menu struct {
// contains filtered or unexported fields
}
func (*Menu) ClearKeydown ¶
func (m *Menu) ClearKeydown()
func (*Menu) SetInDiffTab ¶
SetInDiffTab updates whether we're currently in the diff tab
func (*Menu) SetInstance ¶
SetInstance updates the current instance and refreshes menu options
func (*Menu) SetSize ¶
SetSize sets the width of the window. The menu will be centered horizontally within this width.
type PreviewPane ¶
type PreviewPane struct {
// contains filtered or unexported fields
}
func NewPreviewPane ¶
func NewPreviewPane() *PreviewPane
func (*PreviewPane) ResetToNormalMode ¶
func (p *PreviewPane) ResetToNormalMode(instance *session.Instance) error
ResetToNormalMode exits scroll mode and returns to normal mode
func (*PreviewPane) ScrollDown ¶
func (p *PreviewPane) ScrollDown(instance *session.Instance) error
ScrollDown scrolls down in the viewport
func (*PreviewPane) ScrollUp ¶
func (p *PreviewPane) ScrollUp(instance *session.Instance) error
ScrollUp scrolls up in the viewport
func (*PreviewPane) SetAsyncContent ¶ added in v0.2.1
func (p *PreviewPane) SetAsyncContent(content string)
SetAsyncContent applies content from an async background fetch. Unlike SetRawContent, this does not reset scroll mode — the user may have entered scroll mode while the fetch was in-flight.
func (*PreviewPane) SetRawContent ¶
func (p *PreviewPane) SetRawContent(content string)
SetRawContent sets the preview content directly from a pre-rendered string. Used by the embedded terminal emulator in focus mode.
func (*PreviewPane) SetSize ¶
func (p *PreviewPane) SetSize(width, maxHeight int)
func (*PreviewPane) String ¶
func (p *PreviewPane) String() string
Returns the preview pane content as a string.
func (*PreviewPane) UpdateContent ¶
func (p *PreviewPane) UpdateContent(instance *session.Instance) error
Updates the preview pane content with the tmux pane content
type RepoGroup ¶ added in v0.2.1
type RepoGroup struct {
RepoPath string
RepoName string
TopicNames []string
CountByTopic map[string]int
UngroupedCount int
AutoYesTopics map[string]bool
TopicStatuses map[string]TopicStatus
}
RepoGroup holds all sidebar data for a single repo in multi-repo view.
type Sidebar ¶
type Sidebar struct {
// contains filtered or unexported fields
}
Sidebar is the left-most panel showing topics and search.
func NewSidebar ¶
func NewSidebar() *Sidebar
func (*Sidebar) ActivateSearch ¶
func (s *Sidebar) ActivateSearch()
func (*Sidebar) ClickItem ¶
ClickItem selects a sidebar item by its rendered row offset (0-indexed from the first item). Section headers count as a row but are skipped for selection.
func (*Sidebar) DeactivateSearch ¶
func (s *Sidebar) DeactivateSearch()
func (*Sidebar) GetSearchQuery ¶
func (*Sidebar) GetSelectedID ¶
func (*Sidebar) GetSelectedIdx ¶
GetSelectedIdx returns the index of the currently selected item in the sidebar.
func (*Sidebar) GetSelectedRepoPath ¶ added in v0.2.1
GetSelectedRepoPath returns the RepoPath of the currently selected sidebar item.
func (*Sidebar) IsRepoBtnHit ¶ added in v0.2.1
IsRepoBtnHit tests whether screen coordinates (x, y) fall within the repo button. x and y are absolute screen coordinates; the sidebar is at column 0, row screenTop.
func (*Sidebar) IsSearchActive ¶
func (*Sidebar) SelectFirst ¶
func (s *Sidebar) SelectFirst()
SelectFirst selects the first non-section item (typically "All").
func (*Sidebar) SelectLast ¶ added in v0.2.1
func (s *Sidebar) SelectLast()
SelectLast selects the last non-section item.
func (*Sidebar) SetFocused ¶
func (*Sidebar) SetGroupedItems ¶ added in v0.2.1
SetGroupedItems builds sidebar items with repo section headers for multi-repo view.
func (*Sidebar) SetItems ¶
func (s *Sidebar) SetItems(topicNames []string, instanceCountByTopic map[string]int, ungroupedCount int, sharedTopics map[string]bool, autoYesTopics map[string]bool, topicStatuses map[string]TopicStatus)
SetItems updates the sidebar items from the current topics. sharedTopics maps topic name → whether it has a shared worktree. topicStatuses maps topic name → running/notification status.
func (*Sidebar) SetItemsWithAutomations ¶ added in v0.2.2
func (s *Sidebar) SetItemsWithAutomations(topicNames []string, instanceCountByTopic map[string]int, ungroupedCount int, sharedTopics map[string]bool, autoYesTopics map[string]bool, topicStatuses map[string]TopicStatus, automationInstanceCount int, hasAutomations bool)
SetItemsWithAutomations is like SetItems but also inserts an Automations sidebar entry and a repo name section header above the topics.
func (*Sidebar) SetRepoHovered ¶
SetRepoHovered sets whether the mouse is hovering over the repo button.
func (*Sidebar) SetRepoName ¶
SetRepoName sets the current repo name displayed at the bottom of the sidebar.
func (*Sidebar) SetRepoNames ¶ added in v0.2.1
SetRepoNames sets the repo name(s) displayed at the bottom of the sidebar.
func (*Sidebar) SetSearchQuery ¶
type SidebarItem ¶
type SidebarItem struct {
Name string
ID string
IsSection bool
Count int
MatchCount int // search match count (-1 = not searching)
AutoYes bool // true if this topic has auto-accept enabled
HasRunning bool // true if this topic has running instances
HasNotification bool // true if this topic has recently-finished instances
RepoPath string // repo path this item belongs to (for multi-repo disambiguation)
}
SidebarItem represents a selectable item in the sidebar.
type StatusFilter ¶
type StatusFilter int
StatusFilter determines which instances are shown based on their status.
const ( StatusFilterAll StatusFilter = iota // Show all instances StatusFilterActive // Show only non-paused instances )
type TabbedWindow ¶
type TabbedWindow struct {
// contains filtered or unexported fields
}
TabbedWindow has tabs at the top of a pane which can be selected. The tabs take up one rune of height.
func NewTabbedWindow ¶
func NewTabbedWindow(preview *PreviewPane, terminal *TerminalPane, diff *DiffPane, git *GitPane) *TabbedWindow
func (*TabbedWindow) ApplyPreviewContent ¶ added in v0.2.1
func (w *TabbedWindow) ApplyPreviewContent(content string)
ApplyPreviewContent sets preview content from an async fetch result. Safe to call even if the user entered scroll mode while the fetch was in-flight.
func (*TabbedWindow) ClearContentStale ¶ added in v0.2.1
func (w *TabbedWindow) ClearContentStale()
ClearContentStale marks content as up-to-date after a tick fetches it.
func (*TabbedWindow) ContentScrollDown ¶
func (w *TabbedWindow) ContentScrollDown()
ContentScrollDown scrolls content without file navigation (for mouse wheel). No-op for git tab.
func (*TabbedWindow) ContentScrollUp ¶
func (w *TabbedWindow) ContentScrollUp()
ContentScrollUp scrolls content without file navigation (for mouse wheel). No-op for git tab.
func (*TabbedWindow) GetActiveTab ¶
func (w *TabbedWindow) GetActiveTab() int
GetActiveTab returns the currently active tab index.
func (*TabbedWindow) GetDiffPane ¶ added in v0.2.1
func (w *TabbedWindow) GetDiffPane() *DiffPane
GetDiffPane returns the diff pane for external control.
func (*TabbedWindow) GetGitPane ¶
func (w *TabbedWindow) GetGitPane() *GitPane
GetGitPane returns the git pane for external control.
func (*TabbedWindow) GetPreviewSize ¶
func (w *TabbedWindow) GetPreviewSize() (width, height int)
func (*TabbedWindow) GetTerminalPane ¶ added in v0.2.1
func (w *TabbedWindow) GetTerminalPane() *TerminalPane
GetTerminalPane returns the terminal pane for external control.
func (*TabbedWindow) HandleTabClick ¶
func (w *TabbedWindow) HandleTabClick(localX, localY int) bool
HandleTabClick checks if a click at the given local coordinates (relative to the tabbed window's top-left) hits a tab header. Returns true and switches tabs if a tab was clicked.
func (*TabbedWindow) IsContentStale ¶ added in v0.2.1
func (w *TabbedWindow) IsContentStale() bool
IsContentStale returns whether content needs to be refreshed.
func (*TabbedWindow) IsFocusMode ¶
func (w *TabbedWindow) IsFocusMode() bool
IsFocusMode returns whether the window is in focus/insert mode.
func (*TabbedWindow) IsInDiffTab ¶
func (w *TabbedWindow) IsInDiffTab() bool
IsInDiffTab returns true if the diff tab is currently active
func (*TabbedWindow) IsInGitTab ¶
func (w *TabbedWindow) IsInGitTab() bool
IsInGitTab returns true if the git tab is currently active
func (*TabbedWindow) IsInTerminalTab ¶ added in v0.2.1
func (w *TabbedWindow) IsInTerminalTab() bool
IsInTerminalTab returns true if the terminal tab is currently active.
func (*TabbedWindow) IsPreviewInScrollMode ¶
func (w *TabbedWindow) IsPreviewInScrollMode() bool
IsPreviewInScrollMode returns true if the preview pane is in scroll mode
func (*TabbedWindow) MarkContentStale ¶ added in v0.2.1
func (w *TabbedWindow) MarkContentStale()
MarkContentStale flags that the selected instance changed but expensive content (preview capture, diff) hasn't been fetched yet. The next tick will do the fetch.
func (*TabbedWindow) ResetPreviewToNormalMode ¶
func (w *TabbedWindow) ResetPreviewToNormalMode(instance *session.Instance) error
ResetPreviewToNormalMode resets the preview pane to normal mode
func (*TabbedWindow) ScrollDown ¶
func (w *TabbedWindow) ScrollDown()
ScrollDown scrolls content. In preview tab, scrolls the preview. In diff tab, navigates to the next file if files exist, otherwise scrolls. No-op for git tab (lazygit handles its own scrolling).
func (*TabbedWindow) ScrollUp ¶
func (w *TabbedWindow) ScrollUp()
ScrollUp scrolls content. In preview tab, scrolls the preview. In diff tab, navigates to the previous file if files exist, otherwise scrolls. No-op for git tab (lazygit handles its own scrolling).
func (*TabbedWindow) SetActiveTab ¶
func (w *TabbedWindow) SetActiveTab(tab int)
SetActiveTab sets the active tab by index.
func (*TabbedWindow) SetFocusMode ¶
func (w *TabbedWindow) SetFocusMode(enabled bool)
SetFocusMode enables or disables the focus/insert mode visual indicator.
func (*TabbedWindow) SetGitContent ¶
func (w *TabbedWindow) SetGitContent(content string)
SetGitContent caches the git pane content to avoid re-rendering when unchanged.
func (*TabbedWindow) SetInstance ¶
func (w *TabbedWindow) SetInstance(instance *session.Instance)
func (*TabbedWindow) SetPreviewContent ¶
func (w *TabbedWindow) SetPreviewContent(content string)
SetPreviewContent sets the preview pane content directly from a pre-rendered string. Used by the embedded terminal in focus mode to bypass tmux capture-pane.
func (*TabbedWindow) SetSize ¶
func (w *TabbedWindow) SetSize(width, height int)
func (*TabbedWindow) SetTerminalContent ¶ added in v0.2.1
func (w *TabbedWindow) SetTerminalContent(content string)
SetTerminalContent caches terminal pane content to avoid re-rendering when unchanged.
func (*TabbedWindow) String ¶
func (w *TabbedWindow) String() string
func (*TabbedWindow) Toggle ¶
func (w *TabbedWindow) Toggle()
func (*TabbedWindow) ToggleWithReset ¶
func (w *TabbedWindow) ToggleWithReset(instance *session.Instance) error
ToggleWithReset toggles the tab and resets preview pane to normal mode
func (*TabbedWindow) UpdateDiff ¶
func (w *TabbedWindow) UpdateDiff(instance *session.Instance)
func (*TabbedWindow) UpdatePreview ¶
func (w *TabbedWindow) UpdatePreview(instance *session.Instance) error
UpdatePreview updates the content of the preview pane. instance may be nil.
type TerminalPane ¶ added in v0.2.1
type TerminalPane struct {
// contains filtered or unexported fields
}
TerminalPane manages persistent shell tmux sessions per instance. Unlike GitPane (which kills and recreates on each spawn), TerminalPane keeps tmux sessions alive across tab switches so scrollback and processes are preserved.
func NewTerminalPane ¶ added in v0.2.1
func NewTerminalPane() *TerminalPane
func (*TerminalPane) Attach ¶ added in v0.2.1
func (t *TerminalPane) Attach(worktreePath, instanceTitle string)
Attach creates a tmux session for the instance (if needed) and connects an EmbeddedTerminal to it. If already attached to a different instance, detaches first.
func (*TerminalPane) CurrentInstance ¶ added in v0.2.1
func (t *TerminalPane) CurrentInstance() string
CurrentInstance returns the title of the currently attached instance.
func (*TerminalPane) Detach ¶ added in v0.2.1
func (t *TerminalPane) Detach()
Detach closes the EmbeddedTerminal but keeps the tmux session alive.
func (*TerminalPane) IsAttached ¶ added in v0.2.1
func (t *TerminalPane) IsAttached() bool
IsAttached returns true if an EmbeddedTerminal is active.
func (*TerminalPane) Kill ¶ added in v0.2.1
func (t *TerminalPane) Kill()
Kill detaches and kills ALL tmux sessions (app shutdown).
func (*TerminalPane) KillSession ¶ added in v0.2.1
func (t *TerminalPane) KillSession(instanceTitle string)
KillSession kills a single instance's terminal tmux session.
func (*TerminalPane) Render ¶ added in v0.2.1
func (t *TerminalPane) Render() (string, bool)
Render returns the current terminal frame content.
func (*TerminalPane) SendKey ¶ added in v0.2.1
func (t *TerminalPane) SendKey(data []byte) error
SendKey forwards raw key bytes to the EmbeddedTerminal.
func (*TerminalPane) SetSize ¶ added in v0.2.1
func (t *TerminalPane) SetSize(width, height int)
SetSize updates the dimensions and resizes the active terminal if present.
func (*TerminalPane) String ¶ added in v0.2.1
func (t *TerminalPane) String() string
String returns the current frame for display.
func (*TerminalPane) WaitForRender ¶ added in v0.2.1
func (t *TerminalPane) WaitForRender(timeout time.Duration)
WaitForRender blocks until the embedded terminal has new content or the timeout elapses.
type TopicNotesWindow ¶ added in v0.2.2
type TopicNotesWindow struct {
// contains filtered or unexported fields
}
TopicNotesWindow replaces TabbedWindow when the user is in Notes mode. It has two sub-tabs: Notes (glamour markdown) and Tasks (todo list).
func NewTopicNotesWindow ¶ added in v0.2.2
func NewTopicNotesWindow() *TopicNotesWindow
func (*TopicNotesWindow) GetActiveTab ¶ added in v0.2.2
func (w *TopicNotesWindow) GetActiveTab() int
func (*TopicNotesWindow) GetTasks ¶ added in v0.2.2
func (w *TopicNotesWindow) GetTasks() []session.TopicTask
func (*TopicNotesWindow) HandleTabClick ¶ added in v0.2.2
func (w *TopicNotesWindow) HandleTabClick(localX, localY int) bool
HandleTabClick checks if a click at localX/localY hits a tab. Returns true if tab changed.
func (*TopicNotesWindow) IsInNotesTab ¶ added in v0.2.2
func (w *TopicNotesWindow) IsInNotesTab() bool
func (*TopicNotesWindow) IsInTasksTab ¶ added in v0.2.2
func (w *TopicNotesWindow) IsInTasksTab() bool
func (*TopicNotesWindow) SelectedTask ¶ added in v0.2.2
func (w *TopicNotesWindow) SelectedTask() int
func (*TopicNotesWindow) SetActiveTab ¶ added in v0.2.2
func (w *TopicNotesWindow) SetActiveTab(tab int)
func (*TopicNotesWindow) SetNotes ¶ added in v0.2.2
func (w *TopicNotesWindow) SetNotes(notes string)
func (*TopicNotesWindow) SetSize ¶ added in v0.2.2
func (w *TopicNotesWindow) SetSize(width, height int)
func (*TopicNotesWindow) SetTasks ¶ added in v0.2.2
func (w *TopicNotesWindow) SetTasks(tasks []session.TopicTask)
func (*TopicNotesWindow) String ¶ added in v0.2.2
func (w *TopicNotesWindow) String() string
func (*TopicNotesWindow) TaskCount ¶ added in v0.2.2
func (w *TopicNotesWindow) TaskCount() int
func (*TopicNotesWindow) TaskDown ¶ added in v0.2.2
func (w *TopicNotesWindow) TaskDown()
func (*TopicNotesWindow) TaskUp ¶ added in v0.2.2
func (w *TopicNotesWindow) TaskUp()
func (*TopicNotesWindow) Toggle ¶ added in v0.2.2
func (w *TopicNotesWindow) Toggle()
type TopicStatus ¶
TopicStatus holds status flags for a topic's instances.