Documentation
¶
Overview ¶
Package components provides reusable Bubble Tea TUI components for dispatch.
Package components provides the sub-models (session list, search bar, filter panel, preview, help overlay, shell picker, reindex) that compose the Copilot CLI Session Browser TUI.
Index ¶
- func AbbrevHome(path string) string
- func AbbrevPath(path string) string
- func CleanSummary(s string) string
- func FormatTimestamp(timestamp string) string
- func PadLeft(s string, width int) string
- func PadRight(s string, width int) string
- func PadToWidth(s string, width int) string
- func RelativeTime(timestamp string) string
- func RenderChatBubble(msg, label string, contentWidth int, isUser bool) string
- func RenderConversation(turns []data.Turn, contentWidth int) string
- func RenderTimeline(entries []TimelineEntry, contentW int) string
- func SplitDirLeaf(path string) (parent, leaf string)
- func Truncate(s string, width int) string
- type AliasInput
- func (n *AliasInput) Blur()
- func (n *AliasInput) Focus(sessionID, current string) tea.Cmd
- func (n *AliasInput) Focused() bool
- func (n *AliasInput) SessionID() string
- func (n *AliasInput) SetWidth(w int)
- func (n AliasInput) Update(msg tea.Msg) (AliasInput, tea.Cmd)
- func (n *AliasInput) Value() string
- func (n AliasInput) View() string
- type AttentionPicker
- func (p *AttentionPicker) FilterFavorites() bool
- func (p *AttentionPicker) FilterGitDirty() bool
- func (p *AttentionPicker) FilterMissingWorkspace() bool
- func (p *AttentionPicker) FilterPlans() bool
- func (p *AttentionPicker) HasSelection() bool
- func (p *AttentionPicker) MoveDown()
- func (p *AttentionPicker) MoveUp()
- func (p *AttentionPicker) Selected() map[data.AttentionStatus]struct{}
- func (p *AttentionPicker) SetCounts(counts map[data.AttentionStatus]int)
- func (p *AttentionPicker) SetFavoriteCount(n int)
- func (p *AttentionPicker) SetFilterFavorites(v bool)
- func (p *AttentionPicker) SetFilterGitDirty(v bool)
- func (p *AttentionPicker) SetFilterMissingWorkspace(v bool)
- func (p *AttentionPicker) SetFilterPlans(v bool)
- func (p *AttentionPicker) SetGitDirtyCount(n int)
- func (p *AttentionPicker) SetMissingWorkspaceCount(n int)
- func (p *AttentionPicker) SetPlanCount(n int)
- func (p *AttentionPicker) SetSelected(set map[data.AttentionStatus]struct{})
- func (p *AttentionPicker) SetSize(w, h int)
- func (p *AttentionPicker) SetWorkStatusCounts(counts map[data.WorkStatus]int)
- func (p *AttentionPicker) SetWorkStatusFilter(set map[data.WorkStatus]struct{})
- func (p *AttentionPicker) SetWorkStatusScanned(v bool)
- func (p *AttentionPicker) Toggle()
- func (p AttentionPicker) View() string
- func (p *AttentionPicker) WorkStatusFilter() map[data.WorkStatus]struct{}
- type CmdPalette
- func (p *CmdPalette) Backspace()
- func (p *CmdPalette) Filter() string
- func (p *CmdPalette) FilteredCount() int
- func (p *CmdPalette) MoveDown()
- func (p *CmdPalette) MoveUp()
- func (p *CmdPalette) Selected() (string, bool)
- func (p *CmdPalette) SetCommands(cmds []Command)
- func (p *CmdPalette) SetFilter(s string)
- func (p *CmdPalette) SetSize(w, h int)
- func (p *CmdPalette) TypeRune(r rune)
- func (p CmdPalette) View() string
- type Command
- type CompareView
- type ConfigPanel
- func (c *ConfigPanel) CancelEdit()
- func (c *ConfigPanel) ConfirmEdit()
- func (c *ConfigPanel) HandleEnter() tea.Cmd
- func (c *ConfigPanel) IsEditing() bool
- func (c *ConfigPanel) MoveDown()
- func (c *ConfigPanel) MoveUp()
- func (c *ConfigPanel) SetShellOptions(shells []platform.ShellInfo)
- func (c *ConfigPanel) SetSize(w, h int)
- func (c *ConfigPanel) SetTerminals(names []string)
- func (c *ConfigPanel) SetThemeOptions(names []string)
- func (c *ConfigPanel) SetValues(v ConfigValues)
- func (c ConfigPanel) Update(msg tea.Msg) (ConfigPanel, tea.Cmd)
- func (c *ConfigPanel) Values() ConfigValues
- func (c ConfigPanel) View() string
- type ConfigValues
- type FilePicker
- func (f *FilePicker) ClearWarning()
- func (f *FilePicker) Empty() bool
- func (f *FilePicker) MoveDown()
- func (f *FilePicker) MoveUp()
- func (f *FilePicker) Selected() (data.SessionFile, bool)
- func (f *FilePicker) SetFiles(files []data.SessionFile)
- func (f *FilePicker) SetSize(w, h int)
- func (f *FilePicker) SetWarning(msg string)
- func (f FilePicker) View() string
- type FilterCategory
- type FilterPanel
- func (f *FilterPanel) ActiveBadges() []string
- func (f *FilterPanel) Apply() []string
- func (f *FilterPanel) Cancel()
- func (f *FilterPanel) ClearAll()
- func (f *FilterPanel) CollapseGroup()
- func (f *FilterPanel) ExpandGroup()
- func (f *FilterPanel) HasActive() bool
- func (f *FilterPanel) MoveDown()
- func (f *FilterPanel) MoveUp()
- func (f *FilterPanel) SetActive(_ FilterCategory, _ string)
- func (f *FilterPanel) SetFolders(folders []string, excluded []string)
- func (f *FilterPanel) SetOptions(folders, repos, branches []string)
- func (f *FilterPanel) SetSize(w, h int)
- func (f *FilterPanel) Toggle() (FilterCategory, string, bool)
- func (f *FilterPanel) ToggleExclusion()
- func (f FilterPanel) View() string
- type GitStatusView
- type HelpOverlay
- type NoteInput
- func (n *NoteInput) Blur()
- func (n *NoteInput) Focus(sessionID, currentNote string) tea.Cmd
- func (n *NoteInput) Focused() bool
- func (n *NoteInput) SessionID() string
- func (n *NoteInput) SetWidth(w int)
- func (n NoteInput) Update(msg tea.Msg) (NoteInput, tea.Cmd)
- func (n *NoteInput) Value() string
- func (n NoteInput) View() string
- type PreviewPanel
- func (p *PreviewPanel) ClearSelection()
- func (p *PreviewPanel) Content() string
- func (p *PreviewPanel) ExitPlanView()
- func (p *PreviewPanel) FinalizeSelection() string
- func (p *PreviewPanel) HasPlanContent() bool
- func (p *PreviewPanel) HasSelection() bool
- func (p *PreviewPanel) HitConversationSort(contentRow int) bool
- func (p *PreviewPanel) HitSessionID(contentRow int) bool
- func (p *PreviewPanel) IsSelected(line, col int) bool
- func (p *PreviewPanel) PageDown()
- func (p *PreviewPanel) PageUp()
- func (p *PreviewPanel) PlanViewMode() bool
- func (p *PreviewPanel) RedactSecrets() bool
- func (p *PreviewPanel) ScrollDown(n int)
- func (p *PreviewPanel) ScrollOffset() int
- func (p *PreviewPanel) ScrollUp(n int)
- func (p *PreviewPanel) SelectedText() string
- func (p *PreviewPanel) SessionID() string
- func (p *PreviewPanel) SetAlias(alias string)
- func (p *PreviewPanel) SetAttentionStatus(status data.AttentionStatus)
- func (p *PreviewPanel) SetConversationSort(newestFirst bool)
- func (p *PreviewPanel) SetDetail(d *data.SessionDetail)
- func (p *PreviewPanel) SetGitStatus(status platform.GitStatus)
- func (p *PreviewPanel) SetHasPlan(has bool)
- func (p *PreviewPanel) SetNote(note string)
- func (p *PreviewPanel) SetPlanContent(content string)
- func (p *PreviewPanel) SetRedactSecrets(enabled bool)
- func (p *PreviewPanel) SetSize(w, h int)
- func (p *PreviewPanel) SetWorkStatus(status data.WorkStatusResult)
- func (p *PreviewPanel) SetWorkspaceMissing(missing bool)
- func (p *PreviewPanel) ShowPlanView() bool
- func (p *PreviewPanel) StartSelection(line, col int)
- func (p *PreviewPanel) TimelineMode() bool
- func (p *PreviewPanel) ToggleConversationSort() bool
- func (p *PreviewPanel) TogglePlanView() bool
- func (p *PreviewPanel) ToggleTimeline() bool
- func (p *PreviewPanel) UpdateSelection(line, col int)
- func (p PreviewPanel) View() string
- type ReindexFinishedMsg
- type ReindexHandle
- type ReindexLogPump
- type SearchBar
- func (s *SearchBar) Blur()
- func (s *SearchBar) CursorEnd()
- func (s *SearchBar) Focus() tea.Cmd
- func (s *SearchBar) Focused() bool
- func (s *SearchBar) SetAIError(msg string)
- func (s *SearchBar) SetAIResults(n int)
- func (s *SearchBar) SetAISearching(v bool)
- func (s *SearchBar) SetAIStatus(status string)
- func (s *SearchBar) SetResultCount(n int)
- func (s *SearchBar) SetSearching(v bool)
- func (s *SearchBar) SetValue(v string)
- func (s *SearchBar) SetWidth(w int)
- func (s SearchBar) Update(msg tea.Msg) (SearchBar, tea.Cmd)
- func (s *SearchBar) Value() string
- func (s SearchBar) View() string
- type SessionList
- func (s *SessionList) AllExpanded() bool
- func (s *SessionList) AllSessions() []data.Session
- func (s *SessionList) Anchor() int
- func (s *SessionList) CollapseAll()
- func (s *SessionList) CollapseFolder()
- func (s *SessionList) Cursor() int
- func (s *SessionList) DeselectAll()
- func (s *SessionList) ExpandAll()
- func (s *SessionList) ExpandFolder()
- func (s *SessionList) FindNextWaiting(attentionMap map[string]data.AttentionStatus) int
- func (s *SessionList) FolderSessions() []data.Session
- func (s *SessionList) IsFolderSelected() bool
- func (s *SessionList) IsSelected(id string) bool
- func (s *SessionList) IsShifting() bool
- func (s *SessionList) JumpToBottom()
- func (s *SessionList) JumpToTop()
- func (s *SessionList) MoveDown()
- func (s *SessionList) MoveDownShift()
- func (s *SessionList) MoveTo(idx int)
- func (s *SessionList) MoveUp()
- func (s *SessionList) MoveUpShift()
- func (s *SessionList) ResetShift()
- func (s *SessionList) ScrollBy(delta int)
- func (s *SessionList) ScrollOffset() int
- func (s *SessionList) SelectAll()
- func (s *SessionList) SelectByID(id string) bool
- func (s *SessionList) SelectRange(from, to int)
- func (s *SessionList) Selected() (data.Session, bool)
- func (s *SessionList) SelectedFolderCwd() string
- func (s *SessionList) SelectedFolderPath() string
- func (s *SessionList) SelectedSessions() []data.Session
- func (s *SessionList) SelectionCount() int
- func (s *SessionList) SessionCount() int
- func (s *SessionList) SetAISessions(set map[string]struct{})
- func (s *SessionList) SetAnchor()
- func (s *SessionList) SetAttentionStatuses(m map[string]data.AttentionStatus)
- func (s *SessionList) SetCursor(idx int)
- func (s *SessionList) SetFavoritedSessions(set map[string]struct{})
- func (s *SessionList) SetGitStates(m map[string]platform.GitState)
- func (s *SessionList) SetGitStatuses(m map[string]platform.GitStatus)
- func (s *SessionList) SetGroups(groups []data.SessionGroup)
- func (s *SessionList) SetHiddenColumns(keys []string)
- func (s *SessionList) SetHiddenSessions(set map[string]struct{})
- func (s *SessionList) SetNoteSessions(set map[string]struct{})
- func (s *SessionList) SetPivotField(pivot string)
- func (s *SessionList) SetPlanStatuses(m map[string]bool)
- func (s *SessionList) SetSessions(sessions []data.Session)
- func (s *SessionList) SetSize(w, h int)
- func (s *SessionList) SetTagSessions(set map[string]struct{})
- func (s *SessionList) SetWorkStatuses(m map[string]data.WorkStatusResult)
- func (s *SessionList) ToggleFolder() bool
- func (s *SessionList) ToggleSelected() bool
- func (s SessionList) View() string
- func (s *SessionList) VisibleCount() int
- func (s *SessionList) VisibleSessionIDs() []string
- type ShellPicker
- type TagInput
- func (n *TagInput) Blur()
- func (n *TagInput) Focus(sessionID, current string) tea.Cmd
- func (n *TagInput) Focused() bool
- func (n *TagInput) SessionID() string
- func (n *TagInput) SetWidth(w int)
- func (n TagInput) Update(msg tea.Msg) (TagInput, tea.Cmd)
- func (n *TagInput) Value() string
- func (n TagInput) View() string
- type TimelineEntry
- type ViewPicker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbbrevHome ¶
AbbrevHome returns the path with the user's home directory replaced by "~". Path separators are normalised to the OS-native format for display.
func AbbrevPath ¶
AbbrevPath returns the path with the user's home directory replaced by "~". If the path is not under the home directory, it is returned as-is (full absolute path). This avoids relative-looking paths like "…\code\dispatch".
func CleanSummary ¶
CleanSummary strips chat-style prefixes (e.g. "[user]: ", "[assistant]: ") from a session summary, collapses whitespace to a single line, and returns a display-friendly string. This prevents raw conversation fragments stored by the Copilot CLI from appearing as "chat messages" in the session list.
func FormatTimestamp ¶ added in v0.1.3
FormatTimestamp parses a timestamp string (RFC3339 or common variants) and returns a human-readable local time with timezone, e.g. "Jan 2 3:04 PM MST". On parse failure, the raw string is returned as-is.
func PadRight ¶
PadRight returns s padded with spaces on the right to exactly width runes. If s is longer than width it is truncated.
NOTE: This function uses rune counting, which is NOT ANSI-aware. For strings containing ANSI escape sequences (pre-styled inline text), use PadToWidth instead.
func PadToWidth ¶ added in v0.1.3
PadToWidth pads s with trailing spaces so its visual (printed) width equals exactly width columns. Unlike PadRight, this function is ANSI-aware: it uses lipgloss.Width (which strips escape sequences before measuring) so pre-styled inline content like attention dots is measured correctly.
If the visual width already meets or exceeds width, s is returned unchanged (no truncation — callers are expected to have pre-truncated content).
func RelativeTime ¶
RelativeTime parses a timestamp string and returns a human-friendly relative time such as "2h ago" or "3d ago".
func RenderChatBubble ¶
RenderChatBubble renders a single chat message as a styled bubble with a role label. When isUser is true, both the label and bubble are right-aligned; otherwise they are left-aligned.
func RenderConversation ¶
RenderConversation renders all turns as a chat-style conversation with right-aligned user messages and left-aligned assistant messages.
func RenderTimeline ¶ added in v0.13.0
func RenderTimeline(entries []TimelineEntry, contentW int) string
RenderTimeline produces a styled string rendering of timeline entries suitable for display in the preview panel.
func SplitDirLeaf ¶
SplitDirLeaf splits a path into its parent directory and leaf (last component). Both are normalised to OS-native separators.
Types ¶
type AliasInput ¶ added in v0.14.0
type AliasInput struct {
// contains filtered or unexported fields
}
AliasInput provides an inline text input for editing a session's alias.
func NewAliasInput ¶ added in v0.14.0
func NewAliasInput() AliasInput
NewAliasInput returns an AliasInput ready for use.
func (*AliasInput) Blur ¶ added in v0.14.0
func (n *AliasInput) Blur()
Blur deactivates the alias input.
func (*AliasInput) Focus ¶ added in v0.14.0
func (n *AliasInput) Focus(sessionID, current string) tea.Cmd
Focus activates the alias input for the given session, pre-filling the existing alias value.
func (*AliasInput) Focused ¶ added in v0.14.0
func (n *AliasInput) Focused() bool
Focused returns true when the alias input is capturing keystrokes.
func (*AliasInput) SessionID ¶ added in v0.14.0
func (n *AliasInput) SessionID() string
SessionID returns the session ID being edited.
func (*AliasInput) SetWidth ¶ added in v0.14.0
func (n *AliasInput) SetWidth(w int)
SetWidth sets the available width for the alias input.
func (AliasInput) Update ¶ added in v0.14.0
func (n AliasInput) Update(msg tea.Msg) (AliasInput, tea.Cmd)
Update delegates a tea.Msg to the underlying textinput.
func (*AliasInput) Value ¶ added in v0.14.0
func (n *AliasInput) Value() string
Value returns the current alias text.
func (AliasInput) View ¶ added in v0.14.0
func (n AliasInput) View() string
View renders the alias input bar.
type AttentionPicker ¶ added in v0.1.3
type AttentionPicker struct {
// contains filtered or unexported fields
}
AttentionPicker renders a compact overlay for selecting which attention statuses to include when filtering the session list.
func NewAttentionPicker ¶ added in v0.1.3
func NewAttentionPicker() AttentionPicker
NewAttentionPicker returns a picker with no statuses selected (show all).
func (*AttentionPicker) FilterFavorites ¶ added in v0.8.0
func (p *AttentionPicker) FilterFavorites() bool
FilterFavorites returns whether the "Favorites only" row is checked.
func (*AttentionPicker) FilterGitDirty ¶ added in v0.13.0
func (p *AttentionPicker) FilterGitDirty() bool
FilterGitDirty returns whether the "Git changes" row is checked.
func (*AttentionPicker) FilterMissingWorkspace ¶ added in v0.14.0
func (p *AttentionPicker) FilterMissingWorkspace() bool
FilterMissingWorkspace returns whether the "Missing workspace" row is checked.
func (*AttentionPicker) FilterPlans ¶ added in v0.4.0
func (p *AttentionPicker) FilterPlans() bool
FilterPlans returns whether the "Has plan" row is checked.
func (*AttentionPicker) HasSelection ¶ added in v0.1.3
func (p *AttentionPicker) HasSelection() bool
HasSelection returns true when at least one filter is active.
func (*AttentionPicker) MoveDown ¶ added in v0.1.3
func (p *AttentionPicker) MoveDown()
MoveDown moves the cursor down, wrapping to the top. Skips the separator row.
func (*AttentionPicker) MoveUp ¶ added in v0.1.3
func (p *AttentionPicker) MoveUp()
MoveUp moves the cursor up, wrapping to the bottom. Skips the separator row.
func (*AttentionPicker) Selected ¶ added in v0.1.3
func (p *AttentionPicker) Selected() map[data.AttentionStatus]struct{}
Selected returns a copy of the checked status set.
func (*AttentionPicker) SetCounts ¶ added in v0.1.3
func (p *AttentionPicker) SetCounts(counts map[data.AttentionStatus]int)
SetCounts provides the per-status session counts shown beside each row.
func (*AttentionPicker) SetFavoriteCount ¶ added in v0.8.0
func (p *AttentionPicker) SetFavoriteCount(n int)
SetFavoriteCount sets the session count shown beside the "Favorites only" row.
func (*AttentionPicker) SetFilterFavorites ¶ added in v0.8.0
func (p *AttentionPicker) SetFilterFavorites(v bool)
SetFilterFavorites sets the "Favorites only" row state.
func (*AttentionPicker) SetFilterGitDirty ¶ added in v0.13.0
func (p *AttentionPicker) SetFilterGitDirty(v bool)
SetFilterGitDirty sets the "Git changes" row state.
func (*AttentionPicker) SetFilterMissingWorkspace ¶ added in v0.14.0
func (p *AttentionPicker) SetFilterMissingWorkspace(v bool)
SetFilterMissingWorkspace sets the "Missing workspace" row state.
func (*AttentionPicker) SetFilterPlans ¶ added in v0.4.0
func (p *AttentionPicker) SetFilterPlans(v bool)
SetFilterPlans sets the "Has plan" row state.
func (*AttentionPicker) SetGitDirtyCount ¶ added in v0.13.0
func (p *AttentionPicker) SetGitDirtyCount(n int)
SetGitDirtyCount sets the session count shown beside the "Git changes" row.
func (*AttentionPicker) SetMissingWorkspaceCount ¶ added in v0.14.0
func (p *AttentionPicker) SetMissingWorkspaceCount(n int)
SetMissingWorkspaceCount sets the session count shown beside the "Missing workspace" row.
func (*AttentionPicker) SetPlanCount ¶ added in v0.4.0
func (p *AttentionPicker) SetPlanCount(n int)
SetPlanCount sets the session count shown beside the "Has plan" row.
func (*AttentionPicker) SetSelected ¶ added in v0.1.3
func (p *AttentionPicker) SetSelected(set map[data.AttentionStatus]struct{})
SetSelected initialises the picker with a pre-existing selection.
func (*AttentionPicker) SetSize ¶ added in v0.1.3
func (p *AttentionPicker) SetSize(w, h int)
SetSize updates the overlay dimensions.
func (*AttentionPicker) SetWorkStatusCounts ¶ added in v0.8.0
func (p *AttentionPicker) SetWorkStatusCounts(counts map[data.WorkStatus]int)
SetWorkStatusCounts provides the per-work-status session counts.
func (*AttentionPicker) SetWorkStatusFilter ¶ added in v0.8.0
func (p *AttentionPicker) SetWorkStatusFilter(set map[data.WorkStatus]struct{})
SetWorkStatusFilter initialises the picker with a pre-existing work status selection.
func (*AttentionPicker) SetWorkStatusScanned ¶ added in v0.8.0
func (p *AttentionPicker) SetWorkStatusScanned(v bool)
SetWorkStatusScanned records whether the work status scan has completed.
func (*AttentionPicker) Toggle ¶ added in v0.1.3
func (p *AttentionPicker) Toggle()
Toggle toggles the status at the current cursor position.
func (AttentionPicker) View ¶ added in v0.1.3
func (p AttentionPicker) View() string
View renders the attention picker overlay.
func (*AttentionPicker) WorkStatusFilter ¶ added in v0.8.0
func (p *AttentionPicker) WorkStatusFilter() map[data.WorkStatus]struct{}
WorkStatusFilter returns a copy of the checked work status set.
type CmdPalette ¶ added in v0.13.0
type CmdPalette struct {
// contains filtered or unexported fields
}
CmdPalette renders a filterable, executable command overlay.
func NewCmdPalette ¶ added in v0.13.0
func NewCmdPalette() CmdPalette
NewCmdPalette returns an empty CmdPalette.
func (*CmdPalette) Backspace ¶ added in v0.13.0
func (p *CmdPalette) Backspace()
Backspace removes the last rune from the filter.
func (*CmdPalette) Filter ¶ added in v0.13.0
func (p *CmdPalette) Filter() string
Filter returns the current filter text.
func (*CmdPalette) FilteredCount ¶ added in v0.13.0
func (p *CmdPalette) FilteredCount() int
FilteredCount returns the number of visible commands.
func (*CmdPalette) MoveDown ¶ added in v0.13.0
func (p *CmdPalette) MoveDown()
MoveDown moves the cursor down, stopping at the bottom.
func (*CmdPalette) MoveUp ¶ added in v0.13.0
func (p *CmdPalette) MoveUp()
MoveUp moves the cursor up, stopping at the top.
func (*CmdPalette) Selected ¶ added in v0.13.0
func (p *CmdPalette) Selected() (string, bool)
Selected returns the action ID of the currently highlighted command. The second return value is false if no command is highlighted.
func (*CmdPalette) SetCommands ¶ added in v0.13.0
func (p *CmdPalette) SetCommands(cmds []Command)
SetCommands populates the palette and resets filter state.
func (*CmdPalette) SetFilter ¶ added in v0.13.0
func (p *CmdPalette) SetFilter(s string)
SetFilter updates the filter string and recalculates visible commands.
func (*CmdPalette) SetSize ¶ added in v0.13.0
func (p *CmdPalette) SetSize(w, h int)
SetSize updates the overlay dimensions.
func (*CmdPalette) TypeRune ¶ added in v0.13.0
func (p *CmdPalette) TypeRune(r rune)
TypeRune appends a rune to the filter.
func (CmdPalette) View ¶ added in v0.13.0
func (p CmdPalette) View() string
View renders the command palette overlay.
type Command ¶ added in v0.13.0
type Command struct {
Name string
Shortcut string
Description string
Action string // unique action ID dispatched on selection
Enabled func() bool // returns false to disable/hide the command
}
Command represents a single executable action in the command palette.
type CompareView ¶ added in v0.13.0
type CompareView struct {
// contains filtered or unexported fields
}
CompareView renders a side-by-side comparison of two session details.
func NewCompareView ¶ added in v0.13.0
func NewCompareView() CompareView
NewCompareView creates an empty CompareView. Call SetSessions to populate.
func (*CompareView) PlainText ¶ added in v0.13.0
func (c *CompareView) PlainText() string
PlainText returns an unformatted text summary suitable for clipboard.
func (*CompareView) ScrollDown ¶ added in v0.13.0
func (c *CompareView) ScrollDown()
ScrollDown moves the viewport down by one line.
func (*CompareView) ScrollUp ¶ added in v0.13.0
func (c *CompareView) ScrollUp()
ScrollUp moves the viewport up by one line.
func (*CompareView) SetSessions ¶ added in v0.13.0
func (c *CompareView) SetSessions(a, b *data.SessionDetail)
SetSessions configures the two sessions to compare.
func (*CompareView) SetSize ¶ added in v0.13.0
func (c *CompareView) SetSize(w, h int)
SetSize updates the available rendering dimensions.
func (*CompareView) View ¶ added in v0.13.0
func (c *CompareView) View() string
View renders the compare overlay content.
type ConfigPanel ¶
type ConfigPanel struct {
// contains filtered or unexported fields
}
ConfigPanel presents an overlay that lets users edit session-resume settings (yolo mode, agent, model, launch-in-place, terminal, shell, custom command).
func NewConfigPanel ¶
func NewConfigPanel() ConfigPanel
NewConfigPanel returns a ConfigPanel initialised with the provided values.
func (*ConfigPanel) CancelEdit ¶
func (c *ConfigPanel) CancelEdit()
CancelEdit discards the current text input without saving.
func (*ConfigPanel) ConfirmEdit ¶
func (c *ConfigPanel) ConfirmEdit()
ConfirmEdit saves the current text input value to the appropriate field.
func (*ConfigPanel) HandleEnter ¶
func (c *ConfigPanel) HandleEnter() tea.Cmd
HandleEnter toggles a boolean field, cycles a selection, or starts editing a text field. Returns a tea.Cmd when a text input needs focus.
func (*ConfigPanel) IsEditing ¶
func (c *ConfigPanel) IsEditing() bool
IsEditing returns true when a text field is being edited.
func (*ConfigPanel) MoveDown ¶
func (c *ConfigPanel) MoveDown()
MoveDown moves the cursor to the next field.
func (*ConfigPanel) MoveUp ¶
func (c *ConfigPanel) MoveUp()
MoveUp moves the cursor to the previous field.
func (*ConfigPanel) SetShellOptions ¶
func (c *ConfigPanel) SetShellOptions(shells []platform.ShellInfo)
SetShellOptions provides the list of available shells.
func (*ConfigPanel) SetSize ¶
func (c *ConfigPanel) SetSize(w, h int)
SetSize updates the overlay dimensions.
func (*ConfigPanel) SetTerminals ¶
func (c *ConfigPanel) SetTerminals(names []string)
SetTerminals provides the list of available terminal emulator names.
func (*ConfigPanel) SetThemeOptions ¶
func (c *ConfigPanel) SetThemeOptions(names []string)
SetThemeOptions provides the list of available scheme names for cycling. The first entry should be "auto".
func (*ConfigPanel) SetValues ¶
func (c *ConfigPanel) SetValues(v ConfigValues)
SetValues loads the config panel state from external values.
func (ConfigPanel) Update ¶
func (c ConfigPanel) Update(msg tea.Msg) (ConfigPanel, tea.Cmd)
Update delegates to the underlying text input when editing.
func (*ConfigPanel) Values ¶
func (c *ConfigPanel) Values() ConfigValues
Values returns the current state of all editable fields.
func (ConfigPanel) View ¶
func (c ConfigPanel) View() string
View renders the config panel as a centred overlay.
type ConfigValues ¶
type ConfigValues struct {
YoloMode bool
Agent string
Model string
LaunchMode string
PaneDirection string
Terminal string
Shell string
CustomCommand string
Theme string
WorkspaceRecovery bool
PreviewPosition string
RedactSecrets bool
ExcludedWords string // comma-separated filter words
AutoRefresh string // auto-refresh seconds ("" default, "0" off)
NotifyOnWaiting bool
ShowRepoColumn bool
ShowFolderColumn bool
ShowTurnsColumn bool
ShowHostColumn bool
}
ConfigValues bundles the editable fields exchanged between the config panel and the rest of the application.
type FilePicker ¶ added in v0.13.0
type FilePicker struct {
// contains filtered or unexported fields
}
FilePicker renders a modal list of session files for opening.
func NewFilePicker ¶ added in v0.13.0
func NewFilePicker() FilePicker
NewFilePicker returns an empty FilePicker.
func (*FilePicker) ClearWarning ¶ added in v0.13.0
func (f *FilePicker) ClearWarning()
ClearWarning removes the warning message.
func (*FilePicker) Empty ¶ added in v0.13.0
func (f *FilePicker) Empty() bool
Empty returns true when the picker has no files.
func (*FilePicker) MoveDown ¶ added in v0.13.0
func (f *FilePicker) MoveDown()
MoveDown moves the selection down, stopping at the bottom.
func (*FilePicker) MoveUp ¶ added in v0.13.0
func (f *FilePicker) MoveUp()
MoveUp moves the selection up, stopping at the top.
func (*FilePicker) Selected ¶ added in v0.13.0
func (f *FilePicker) Selected() (data.SessionFile, bool)
Selected returns the currently highlighted file, if any.
func (*FilePicker) SetFiles ¶ added in v0.13.0
func (f *FilePicker) SetFiles(files []data.SessionFile)
SetFiles replaces the file list and resets the cursor.
func (*FilePicker) SetSize ¶ added in v0.13.0
func (f *FilePicker) SetSize(w, h int)
SetSize updates the overlay dimensions.
func (*FilePicker) SetWarning ¶ added in v0.13.0
func (f *FilePicker) SetWarning(msg string)
SetWarning sets a transient warning message displayed below the list.
func (FilePicker) View ¶ added in v0.13.0
func (f FilePicker) View() string
View renders the file picker overlay.
type FilterCategory ¶
type FilterCategory int
FilterCategory identifies the kind of filter (kept for badge compatibility).
const ( // FilterFolder represents a directory-based filter category. FilterFolder FilterCategory = iota )
type FilterPanel ¶
type FilterPanel struct {
// contains filtered or unexported fields
}
FilterPanel is an overlay showing a hierarchical directory tree for multi-select exclusion. Users navigate with arrows, toggle with Space, apply with Enter, and cancel with Esc.
func (*FilterPanel) ActiveBadges ¶
func (f *FilterPanel) ActiveBadges() []string
ActiveBadges returns a slice of short badge strings representing the currently applied exclusions.
func (*FilterPanel) Apply ¶
func (f *FilterPanel) Apply() []string
Apply commits the pending exclusions and returns them as a string slice.
func (*FilterPanel) Cancel ¶
func (f *FilterPanel) Cancel()
Cancel discards the pending exclusions (reverts to last applied state).
func (*FilterPanel) ClearAll ¶
func (f *FilterPanel) ClearAll()
ClearAll removes all active filters.
func (*FilterPanel) CollapseGroup ¶
func (f *FilterPanel) CollapseGroup()
CollapseGroup collapses the group under the cursor.
func (*FilterPanel) ExpandGroup ¶
func (f *FilterPanel) ExpandGroup()
ExpandGroup expands the group under the cursor.
func (*FilterPanel) HasActive ¶
func (f *FilterPanel) HasActive() bool
HasActive returns true if any exclusions are applied.
func (*FilterPanel) SetActive ¶
func (f *FilterPanel) SetActive(_ FilterCategory, _ string)
SetActive is a no-op kept for backward compatibility with time-range quick-key calls (time ranges are now handled outside the filter panel).
func (*FilterPanel) SetFolders ¶
func (f *FilterPanel) SetFolders(folders []string, excluded []string)
SetFolders populates the filter panel with folder paths and initialises the pending exclusion set from the given excluded dirs.
func (*FilterPanel) SetOptions ¶
func (f *FilterPanel) SetOptions(folders, repos, branches []string)
SetOptions is a backward-compatible shim (deprecated — use SetFolders).
func (*FilterPanel) SetSize ¶
func (f *FilterPanel) SetSize(w, h int)
SetSize updates the overlay dimensions.
func (*FilterPanel) Toggle ¶
func (f *FilterPanel) Toggle() (FilterCategory, string, bool)
Toggle is provided for backward compatibility. It calls ToggleExclusion and returns placeholder values.
func (*FilterPanel) ToggleExclusion ¶
func (f *FilterPanel) ToggleExclusion()
ToggleExclusion toggles the exclusion state of the item under the cursor. On a child: toggles that directory. On a parent: toggles all children.
func (FilterPanel) View ¶
func (f FilterPanel) View() string
View renders the filter panel as a centred overlay.
type GitStatusView ¶ added in v0.14.0
type GitStatusView struct {
// contains filtered or unexported fields
}
GitStatusView renders a detailed Git status overlay for the working directory a session is mapped to: branch, upstream, push/pull (ahead/behind) counts, working-tree category counts, and a scrollable list of changed files.
func NewGitStatusView ¶ added in v0.14.0
func NewGitStatusView() GitStatusView
NewGitStatusView returns an empty GitStatusView. Call SetStatus to populate.
func (*GitStatusView) PlainText ¶ added in v0.14.0
func (g *GitStatusView) PlainText() string
PlainText returns an unstyled summary suitable for the clipboard.
func (*GitStatusView) ScrollDown ¶ added in v0.14.0
func (g *GitStatusView) ScrollDown()
ScrollDown moves the changed-file viewport down by one line.
func (*GitStatusView) ScrollUp ¶ added in v0.14.0
func (g *GitStatusView) ScrollUp()
ScrollUp moves the changed-file viewport up by one line.
func (*GitStatusView) SetSize ¶ added in v0.14.0
func (g *GitStatusView) SetSize(w, h int)
SetSize updates the available rendering dimensions.
func (*GitStatusView) SetStatus ¶ added in v0.14.0
func (g *GitStatusView) SetStatus(s platform.GitStatus)
SetStatus configures the git status to display and resets scroll.
func (*GitStatusView) View ¶ added in v0.14.0
func (g *GitStatusView) View() string
View renders the git status overlay, centered in the available area.
type HelpOverlay ¶
type HelpOverlay struct {
// contains filtered or unexported fields
}
HelpOverlay renders a hand-crafted keyboard shortcut reference as a centred overlay panel. It replaces the bubbles/help.Model approach with a clean two-column layout grouped by category.
func NewHelpOverlay ¶
func NewHelpOverlay() HelpOverlay
NewHelpOverlay returns a ready-to-use HelpOverlay.
func (*HelpOverlay) SetSize ¶
func (h *HelpOverlay) SetSize(width, height int)
SetSize updates the overlay dimensions.
func (HelpOverlay) ShortView ¶
func (h HelpOverlay) ShortView() string
ShortView renders a compact single-line help hint for the status bar.
func (HelpOverlay) View ¶
func (h HelpOverlay) View() string
View renders the full help overlay centred on screen.
type NoteInput ¶ added in v0.13.0
type NoteInput struct {
// contains filtered or unexported fields
}
NoteInput provides an inline text input for editing session notes.
func NewNoteInput ¶ added in v0.13.0
func NewNoteInput() NoteInput
NewNoteInput returns a NoteInput ready for use.
func (*NoteInput) Blur ¶ added in v0.13.0
func (n *NoteInput) Blur()
Blur deactivates the note input.
func (*NoteInput) Focus ¶ added in v0.13.0
Focus activates the note input for the given session, pre-filling the existing note value.
func (*NoteInput) Focused ¶ added in v0.13.0
Focused returns true when the note input is capturing keystrokes.
type PreviewPanel ¶
type PreviewPanel struct {
// contains filtered or unexported fields
}
PreviewPanel renders a detail panel for the selected session.
func NewPreviewPanel ¶
func NewPreviewPanel() PreviewPanel
NewPreviewPanel returns an empty PreviewPanel.
func (*PreviewPanel) ClearSelection ¶ added in v0.8.0
func (p *PreviewPanel) ClearSelection()
ClearSelection resets all selection state.
func (*PreviewPanel) Content ¶ added in v0.8.0
func (p *PreviewPanel) Content() string
Content returns the full text content currently displayed in the preview pane. When in plan view mode, the plan content is returned; otherwise the rendered session detail text is returned. Returns an empty string when no content is available.
func (*PreviewPanel) ExitPlanView ¶ added in v0.4.0
func (p *PreviewPanel) ExitPlanView()
ExitPlanView switches back to normal session detail view.
func (*PreviewPanel) FinalizeSelection ¶ added in v0.8.0
func (p *PreviewPanel) FinalizeSelection() string
FinalizeSelection completes the drag and returns the selected text. The returned string is extracted from the stored renderedLines using the normalised selection range. Returns empty string if no selection.
func (*PreviewPanel) HasPlanContent ¶ added in v0.4.0
func (p *PreviewPanel) HasPlanContent() bool
HasPlanContent returns true when plan.md content is available.
func (*PreviewPanel) HasSelection ¶ added in v0.8.0
func (p *PreviewPanel) HasSelection() bool
HasSelection returns true when a completed text selection exists.
func (*PreviewPanel) HitConversationSort ¶ added in v0.1.3
func (p *PreviewPanel) HitConversationSort(contentRow int) bool
HitConversationSort reports whether contentRow (a 0-indexed line in the full rendered content) falls within the clickable zone around the "Conversation" header label. The zone spans from the separator line above through the blank line below the label (4 lines total).
func (*PreviewPanel) HitSessionID ¶ added in v0.4.0
func (p *PreviewPanel) HitSessionID(contentRow int) bool
HitSessionID reports whether contentRow (a 0-indexed line in the full rendered content) falls on the "ID: ..." field line. This is used by the mouse handler to detect clicks that should copy the session ID.
func (*PreviewPanel) IsSelected ¶ added in v0.8.0
func (p *PreviewPanel) IsSelected(line, col int) bool
IsSelected reports whether the given content [line, col] falls within the current selection range. Used by View() to highlight selected text.
func (*PreviewPanel) PageDown ¶
func (p *PreviewPanel) PageDown()
PageDown scrolls down by half the viewport height.
func (*PreviewPanel) PageUp ¶
func (p *PreviewPanel) PageUp()
PageUp scrolls up by half the viewport height.
func (*PreviewPanel) PlanViewMode ¶ added in v0.4.0
func (p *PreviewPanel) PlanViewMode() bool
PlanViewMode returns true when the preview is showing plan content.
func (*PreviewPanel) RedactSecrets ¶ added in v0.13.0
func (p *PreviewPanel) RedactSecrets() bool
RedactSecrets returns whether secret redaction is active.
func (*PreviewPanel) ScrollDown ¶
func (p *PreviewPanel) ScrollDown(n int)
ScrollDown scrolls the preview content down by n lines.
func (*PreviewPanel) ScrollOffset ¶ added in v0.1.3
func (p *PreviewPanel) ScrollOffset() int
ScrollOffset returns the current scroll position.
func (*PreviewPanel) ScrollUp ¶
func (p *PreviewPanel) ScrollUp(n int)
ScrollUp scrolls the preview content up by n lines.
func (*PreviewPanel) SelectedText ¶ added in v0.8.0
func (p *PreviewPanel) SelectedText() string
SelectedText returns the currently selected text without clearing the selection. Returns empty string if no selection or no rendered lines.
func (*PreviewPanel) SessionID ¶ added in v0.4.0
func (p *PreviewPanel) SessionID() string
SessionID returns the current session ID, or empty string if no detail is set.
func (*PreviewPanel) SetAlias ¶ added in v0.14.0
func (p *PreviewPanel) SetAlias(alias string)
SetAlias updates the alias shown at the top of the preview.
func (*PreviewPanel) SetAttentionStatus ¶ added in v0.1.3
func (p *PreviewPanel) SetAttentionStatus(status data.AttentionStatus)
SetAttentionStatus updates the attention status shown in the preview.
func (*PreviewPanel) SetConversationSort ¶ added in v0.1.3
func (p *PreviewPanel) SetConversationSort(newestFirst bool)
SetConversationSort sets the conversation turn display order. When newestFirst is true, turns are shown in descending order (newest at the top). When false, turns are shown in ascending order (oldest first).
func (*PreviewPanel) SetDetail ¶
func (p *PreviewPanel) SetDetail(d *data.SessionDetail)
SetDetail updates the displayed session detail.
func (*PreviewPanel) SetGitStatus ¶ added in v0.14.0
func (p *PreviewPanel) SetGitStatus(status platform.GitStatus)
SetGitStatus stores the detailed git status for the current session so the preview can render a git section (branch/upstream, push/pull, change counts).
func (*PreviewPanel) SetHasPlan ¶ added in v0.4.0
func (p *PreviewPanel) SetHasPlan(has bool)
SetHasPlan records whether the session has a plan.md file (for the indicator shown in the detail view, independent of plan content loading).
func (*PreviewPanel) SetNote ¶ added in v0.13.0
func (p *PreviewPanel) SetNote(note string)
SetNote updates the user note shown at the top of the preview.
func (*PreviewPanel) SetPlanContent ¶ added in v0.4.0
func (p *PreviewPanel) SetPlanContent(content string)
SetPlanContent stores the plan.md content for the current session. Pass an empty string to clear the plan content.
func (*PreviewPanel) SetRedactSecrets ¶ added in v0.13.0
func (p *PreviewPanel) SetRedactSecrets(enabled bool)
SetRedactSecrets enables or disables secret redaction in preview text.
func (*PreviewPanel) SetSize ¶
func (p *PreviewPanel) SetSize(w, h int)
SetSize updates the panel dimensions.
func (*PreviewPanel) SetWorkStatus ¶ added in v0.8.0
func (p *PreviewPanel) SetWorkStatus(status data.WorkStatusResult)
SetWorkStatus sets the work status for the currently displayed session.
func (*PreviewPanel) SetWorkspaceMissing ¶ added in v0.14.0
func (p *PreviewPanel) SetWorkspaceMissing(missing bool)
SetWorkspaceMissing sets whether the current session's working directory is missing from disk. When true, the preview shows a Missing workspace badge.
func (*PreviewPanel) ShowPlanView ¶ added in v0.8.0
func (p *PreviewPanel) ShowPlanView() bool
ShowPlanView enters plan view mode if plan content is available. Unlike TogglePlanView, this is idempotent — calling it when already in plan view is a no-op.
func (*PreviewPanel) StartSelection ¶ added in v0.8.0
func (p *PreviewPanel) StartSelection(line, col int)
StartSelection begins a click-drag text selection at the given content line and column. Call this on MouseClick in the preview content area.
func (*PreviewPanel) TimelineMode ¶ added in v0.13.0
func (p *PreviewPanel) TimelineMode() bool
TimelineMode returns true when the preview is showing the activity timeline.
func (*PreviewPanel) ToggleConversationSort ¶ added in v0.1.3
func (p *PreviewPanel) ToggleConversationSort() bool
ToggleConversationSort flips the conversation sort order and returns the new value.
func (*PreviewPanel) TogglePlanView ¶ added in v0.4.0
func (p *PreviewPanel) TogglePlanView() bool
TogglePlanView switches between plan view and normal session detail view. Returns the new plan view mode state. Does nothing if no plan content is set.
func (*PreviewPanel) ToggleTimeline ¶ added in v0.13.0
func (p *PreviewPanel) ToggleTimeline() bool
ToggleTimeline switches between timeline mode and the current view. Returns the new timeline mode state. Requires a session detail to be set.
func (*PreviewPanel) UpdateSelection ¶ added in v0.8.0
func (p *PreviewPanel) UpdateSelection(line, col int)
UpdateSelection extends the current selection to the given position. Call this on MouseMotion while the left button is held.
func (PreviewPanel) View ¶
func (p PreviewPanel) View() string
View renders the preview panel content.
type ReindexFinishedMsg ¶
type ReindexFinishedMsg struct {
Err error
}
ReindexFinishedMsg is sent when a reindex completes. The model re-queries the session store database on receipt.
type ReindexHandle ¶
type ReindexHandle struct {
Cancel context.CancelFunc
}
ReindexHandle holds the cancel function for a running reindex so the caller can abort it from the UI.
func StartChronicleReindex ¶
func StartChronicleReindex() (ReindexHandle, []tea.Cmd)
StartChronicleReindex launches a full chronicle rebuild via the Copilot CLI in a pseudo-terminal. This is a manual repair action — normal session refresh is handled by the DBWatcher. It returns a ReindexHandle (for cancellation) and two Cmds: one that runs the reindex (sending ReindexFinishedMsg on completion), and one that pumps log lines into ReindexLogPump messages.
Falls back to Maintain() if the copilot binary is not found.
type ReindexLogPump ¶
type ReindexLogPump struct {
Lines []string
// contains filtered or unexported fields
}
ReindexLogPump carries a batch of log lines and the channel reference so the model can request the next batch.
func (ReindexLogPump) NextLogCmd ¶
func (p ReindexLogPump) NextLogCmd() tea.Cmd
NextLogCmd returns the Cmd to wait for the next batch of log lines.
type SearchBar ¶
type SearchBar struct {
// contains filtered or unexported fields
}
SearchBar wraps a bubbles textinput for FTS5 session search.
func (*SearchBar) CursorEnd ¶ added in v0.14.0
func (s *SearchBar) CursorEnd()
CursorEnd moves the input cursor to the end of the current value.
func (*SearchBar) SetAIError ¶
SetAIError sets the AI error message shown when status is "error".
func (*SearchBar) SetAIResults ¶
SetAIResults sets the count of AI-found sessions from the last search.
func (*SearchBar) SetAISearching ¶
SetAISearching sets the Copilot SDK search-in-progress indicator.
func (*SearchBar) SetAIStatus ¶
SetAIStatus sets the Copilot SDK connection status. Valid values: "" (not started), "connecting", "ready", "error".
func (*SearchBar) SetResultCount ¶
SetResultCount updates the displayed result count.
func (*SearchBar) SetSearching ¶
SetSearching sets the deep-search-in-progress indicator.
type SessionList ¶
type SessionList struct {
// contains filtered or unexported fields
}
SessionList renders a vertical list of sessions with optional collapsible folder tree grouping when pivoting is active.
func NewSessionList ¶
func NewSessionList() SessionList
NewSessionList returns an empty SessionList.
func (*SessionList) AllExpanded ¶ added in v0.4.0
func (s *SessionList) AllExpanded() bool
AllExpanded returns true when every folder in allItems is currently expanded.
func (*SessionList) AllSessions ¶ added in v0.1.3
func (s *SessionList) AllSessions() []data.Session
AllSessions returns a flat slice of all sessions in display order (skipping folder nodes). This is used for sequential navigation (e.g. jump-to-next-waiting).
func (*SessionList) Anchor ¶ added in v0.1.3
func (s *SessionList) Anchor() int
Anchor returns the anchor index for range selection.
func (*SessionList) CollapseAll ¶
func (s *SessionList) CollapseAll()
CollapseAll sets all folder groups to collapsed state and rebuilds the visible item list. Used by the screenshot generator.
func (*SessionList) CollapseFolder ¶
func (s *SessionList) CollapseFolder()
CollapseFolder collapses the folder under the cursor (no-op if not a folder or already collapsed).
func (*SessionList) Cursor ¶
func (s *SessionList) Cursor() int
Cursor returns the current cursor position within visible items.
func (*SessionList) DeselectAll ¶ added in v0.1.3
func (s *SessionList) DeselectAll()
DeselectAll clears all selections.
func (*SessionList) ExpandAll ¶ added in v0.4.0
func (s *SessionList) ExpandAll()
ExpandAll expands every folder row and rebuilds the visible list.
func (*SessionList) ExpandFolder ¶
func (s *SessionList) ExpandFolder()
ExpandFolder expands the folder under the cursor (no-op if not a folder or already expanded).
func (*SessionList) FindNextWaiting ¶ added in v0.1.3
func (s *SessionList) FindNextWaiting(attentionMap map[string]data.AttentionStatus) int
FindNextWaiting searches forward from the current cursor position for the next visible session item with AttentionWaiting status. Returns the visItems index, or -1 if none found. Wraps around to the beginning.
func (*SessionList) FolderSessions ¶ added in v0.1.3
func (s *SessionList) FolderSessions() []data.Session
FolderSessions returns all sessions under the folder at the cursor position, including children of collapsed sub-folders (it walks allItems, not visItems). Returns nil if the cursor is not on a folder.
func (*SessionList) IsFolderSelected ¶
func (s *SessionList) IsFolderSelected() bool
IsFolderSelected returns true when the cursor is on a folder node.
func (*SessionList) IsSelected ¶ added in v0.1.3
func (s *SessionList) IsSelected(id string) bool
IsSelected returns true if the given session ID is in the selection set.
func (*SessionList) IsShifting ¶ added in v0.8.0
func (s *SessionList) IsShifting() bool
IsShifting returns true if shift-selection is active.
func (*SessionList) JumpToBottom ¶ added in v0.14.0
func (s *SessionList) JumpToBottom()
JumpToBottom moves the cursor to the last visible item.
func (*SessionList) JumpToTop ¶ added in v0.14.0
func (s *SessionList) JumpToTop()
JumpToTop moves the cursor to the first visible item.
func (*SessionList) MoveDown ¶
func (s *SessionList) MoveDown()
MoveDown moves the cursor to the next visible item.
func (*SessionList) MoveDownShift ¶ added in v0.8.0
func (s *SessionList) MoveDownShift()
MoveDownShift moves cursor down and extends range selection. On first shift press, sets anchor at current position before moving.
func (*SessionList) MoveTo ¶
func (s *SessionList) MoveTo(idx int)
MoveTo sets the cursor to a specific visible-item index, clamping to bounds.
func (*SessionList) MoveUp ¶
func (s *SessionList) MoveUp()
MoveUp moves the cursor to the previous visible item.
func (*SessionList) MoveUpShift ¶ added in v0.8.0
func (s *SessionList) MoveUpShift()
MoveUpShift moves cursor up and extends range selection. On first shift press, sets anchor at current position before moving.
func (*SessionList) ResetShift ¶ added in v0.8.0
func (s *SessionList) ResetShift()
ResetShift clears the shift-selection state. Called when regular (non-shift) navigation occurs.
func (*SessionList) ScrollBy ¶
func (s *SessionList) ScrollBy(delta int)
ScrollBy adjusts the scroll offset by delta lines (positive = down).
func (*SessionList) ScrollOffset ¶
func (s *SessionList) ScrollOffset() int
ScrollOffset returns the current scroll position.
func (*SessionList) SelectAll ¶ added in v0.1.3
func (s *SessionList) SelectAll()
SelectAll marks all visible non-folder sessions as selected.
func (*SessionList) SelectByID ¶ added in v0.9.0
func (s *SessionList) SelectByID(id string) bool
SelectByID moves the cursor to the visible session matching the given ID. Returns true if the session was found and the cursor was moved.
func (*SessionList) SelectRange ¶ added in v0.1.3
func (s *SessionList) SelectRange(from, to int)
SelectRange selects all visible non-folder sessions between indices from and to (inclusive), clearing any previous selections first. This implements Shift+click range selection.
func (*SessionList) Selected ¶
func (s *SessionList) Selected() (data.Session, bool)
Selected returns the currently highlighted session.
func (*SessionList) SelectedFolderCwd ¶ added in v0.4.0
func (s *SessionList) SelectedFolderCwd() string
SelectedFolderCwd returns the working directory to use when launching a new session from the currently selected folder node:
- folder pivot: the folder path itself (it IS a directory)
- repo pivot: the Cwd of the first child session in the group
- branch/date: "" (no meaningful directory to launch into)
func (*SessionList) SelectedFolderPath ¶
func (s *SessionList) SelectedFolderPath() string
SelectedFolderPath returns the path/label of the selected folder, or "".
func (*SessionList) SelectedSessions ¶ added in v0.1.3
func (s *SessionList) SelectedSessions() []data.Session
SelectedSessions returns all selected sessions in display order. If no sessions are explicitly selected, returns nil.
func (*SessionList) SelectionCount ¶ added in v0.1.3
func (s *SessionList) SelectionCount() int
SelectionCount returns the number of currently selected sessions.
func (*SessionList) SessionCount ¶
func (s *SessionList) SessionCount() int
SessionCount returns the number of (non-folder) items across all items.
func (*SessionList) SetAISessions ¶
func (s *SessionList) SetAISessions(set map[string]struct{})
SetAISessions updates the set of AI-found session IDs, used to render those sessions with a "✦" marker.
func (*SessionList) SetAnchor ¶ added in v0.1.3
func (s *SessionList) SetAnchor()
SetAnchor records the current cursor position as the anchor for Shift+click range selection (mirrors Windows Explorer behavior).
func (*SessionList) SetAttentionStatuses ¶ added in v0.1.3
func (s *SessionList) SetAttentionStatuses(m map[string]data.AttentionStatus)
SetAttentionStatuses updates the attention status map used to render colored dots next to each session.
func (*SessionList) SetCursor ¶ added in v0.1.3
func (s *SessionList) SetCursor(idx int)
SetCursor moves the cursor to the given visible-item index, clamping to valid bounds and adjusting the scroll offset.
func (*SessionList) SetFavoritedSessions ¶ added in v0.2.0
func (s *SessionList) SetFavoritedSessions(set map[string]struct{})
SetFavoritedSessions updates the set of favorited session IDs, used to render those sessions with a "★" marker.
func (*SessionList) SetGitStates ¶ added in v0.13.0
func (s *SessionList) SetGitStates(m map[string]platform.GitState)
SetGitStates updates the git workspace state map used to render git state badges on each session row.
func (*SessionList) SetGitStatuses ¶ added in v0.14.0
func (s *SessionList) SetGitStatuses(m map[string]platform.GitStatus)
SetGitStatuses updates the detailed git status map used to render the inline push/pull (ahead/behind) stats column on each session row.
func (*SessionList) SetGroups ¶
func (s *SessionList) SetGroups(groups []data.SessionGroup)
SetGroups replaces the list content with grouped sessions (tree mode). Folders are collapsible; initial state is expanded.
func (*SessionList) SetHiddenColumns ¶ added in v0.14.0
func (s *SessionList) SetHiddenColumns(keys []string)
SetHiddenColumns records which optional session-list columns should be hidden. An empty or nil slice shows every column.
func (*SessionList) SetHiddenSessions ¶
func (s *SessionList) SetHiddenSessions(set map[string]struct{})
SetHiddenSessions updates the set of hidden session IDs, used to render hidden sessions with a dimmed style.
func (*SessionList) SetNoteSessions ¶ added in v0.13.0
func (s *SessionList) SetNoteSessions(set map[string]struct{})
SetNoteSessions updates the set of session IDs that have a user note, used to render those sessions with a pencil marker.
func (*SessionList) SetPivotField ¶ added in v0.1.3
func (s *SessionList) SetPivotField(pivot string)
SetPivotField stores the current pivot mode so that group header icons reflect the active grouping dimension (folder, repo, branch, date, host).
func (*SessionList) SetPlanStatuses ¶ added in v0.4.0
func (s *SessionList) SetPlanStatuses(m map[string]bool)
SetPlanStatuses updates the plan status map used to render cyan plan indicator dots next to sessions that have a plan.md file.
func (*SessionList) SetSessions ¶
func (s *SessionList) SetSessions(sessions []data.Session)
SetSessions replaces the list content with a flat slice of sessions.
func (*SessionList) SetSize ¶
func (s *SessionList) SetSize(w, h int)
SetSize updates the available rendering dimensions.
func (*SessionList) SetTagSessions ¶ added in v0.14.0
func (s *SessionList) SetTagSessions(set map[string]struct{})
SetTagSessions updates the set of session IDs that carry user tags, used to render those sessions with a tag marker.
func (*SessionList) SetWorkStatuses ¶ added in v0.8.0
func (s *SessionList) SetWorkStatuses(m map[string]data.WorkStatusResult)
SetWorkStatuses updates the work status map used to render work status indicators on each session row.
func (*SessionList) ToggleFolder ¶
func (s *SessionList) ToggleFolder() bool
ToggleFolder expands or collapses the folder under the cursor. Returns true if the cursor was on a folder.
func (*SessionList) ToggleSelected ¶ added in v0.1.3
func (s *SessionList) ToggleSelected() bool
ToggleSelected toggles the selection state of the session under the cursor. Returns true if the cursor was on a session (not a folder).
func (SessionList) View ¶
func (s SessionList) View() string
View renders the visible portion of the list.
func (*SessionList) VisibleCount ¶
func (s *SessionList) VisibleCount() int
VisibleCount returns the number of currently visible items.
func (*SessionList) VisibleSessionIDs ¶ added in v0.8.0
func (s *SessionList) VisibleSessionIDs() []string
VisibleSessionIDs returns the session IDs of all currently visible (non-folder) items. This is used to scope scans to only filtered sessions.
type ShellPicker ¶
type ShellPicker struct {
// contains filtered or unexported fields
}
ShellPicker renders a modal list of detected shells for session launch.
func NewShellPicker ¶
func NewShellPicker() ShellPicker
NewShellPicker returns an empty ShellPicker.
func (*ShellPicker) Selected ¶
func (s *ShellPicker) Selected() (platform.ShellInfo, bool)
Selected returns the currently highlighted shell.
func (*ShellPicker) SetShells ¶
func (s *ShellPicker) SetShells(shells []platform.ShellInfo, defaultShell string)
SetShells replaces the available shells. If defaultShell is non-empty, it is placed first in the list with a "(default)" label.
func (*ShellPicker) SetSize ¶
func (s *ShellPicker) SetSize(w, h int)
SetSize updates the overlay dimensions.
type TagInput ¶ added in v0.14.0
type TagInput struct {
// contains filtered or unexported fields
}
TagInput provides an inline text input for editing a session's tags as a comma-separated list.
func NewTagInput ¶ added in v0.14.0
func NewTagInput() TagInput
NewTagInput returns a TagInput ready for use.
func (*TagInput) Focus ¶ added in v0.14.0
Focus activates the tag input for the given session, pre-filling the existing comma-separated tag value.
func (*TagInput) Focused ¶ added in v0.14.0
Focused returns true when the tag input is capturing keystrokes.
type TimelineEntry ¶ added in v0.13.0
type TimelineEntry struct {
Time time.Time
Icon string
Description string
Category string // "turn", "checkpoint", "file", "ref"
}
TimelineEntry represents a single timestamped event in the activity timeline.
func BuildTimeline ¶ added in v0.13.0
func BuildTimeline(detail *data.SessionDetail) []TimelineEntry
BuildTimeline merges turns, checkpoints, files, and refs from a session detail into a chronologically sorted list of timeline entries.
type ViewPicker ¶ added in v0.13.0
type ViewPicker struct {
// contains filtered or unexported fields
}
ViewPicker renders a modal overlay for selecting a named view.
func NewViewPicker ¶ added in v0.13.0
func NewViewPicker() ViewPicker
NewViewPicker returns an empty ViewPicker with only the default entry.
func (*ViewPicker) MoveDown ¶ added in v0.13.0
func (p *ViewPicker) MoveDown()
MoveDown moves the selection down, stopping at the bottom.
func (*ViewPicker) MoveUp ¶ added in v0.13.0
func (p *ViewPicker) MoveUp()
MoveUp moves the selection up, stopping at the top.
func (*ViewPicker) Selected ¶ added in v0.13.0
func (p *ViewPicker) Selected() string
Selected returns the name of the currently highlighted view.
func (*ViewPicker) SetActiveView ¶ added in v0.13.0
func (p *ViewPicker) SetActiveView(name string)
SetActiveView sets the currently active view name for highlighting.
func (*ViewPicker) SetSize ¶ added in v0.13.0
func (p *ViewPicker) SetSize(w, h int)
SetSize updates the overlay dimensions.
func (*ViewPicker) SetViews ¶ added in v0.13.0
func (p *ViewPicker) SetViews(views []config.NamedView)
SetViews replaces the list of available views from config. The "Default" entry is always prepended.
func (ViewPicker) View ¶ added in v0.13.0
func (p ViewPicker) View() string
View renders the view picker overlay.