Documentation
¶
Overview ¶
Package tui implements the Bubble Tea terminal user interface for browsing and launching Copilot CLI sessions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the top-level Bubble Tea model for the Session Browser TUI.
TODO(#113): Model is a God Object (60+ fields). Further extraction into feature-specific sub-structs (FilterState, DataState) would improve maintainability. See https://github.com/jongio/dispatch/issues/113.
func NewModelWithQuery ¶ added in v0.14.0
NewModelWithQuery creates the root Model and seeds an initial search query that is applied once the session store opens. An empty query behaves exactly like NewModel.
type SearchFilter ¶ added in v0.13.0
type SearchFilter struct {
Repo string // repo:<value>
Branch string // branch:<value>
Folder string // folder:<value>
Host string // host:<value>
Status string // status:<value> (waiting, active, stale, idle, interrupted)
HasPlan bool // has:plan
IsFav bool // is:favorite
IsHidden bool // is:hidden
Tag string // tag:<value>
// After and Before bound the session's last-active time. They are parsed
// from after:<date> and before:<date> tokens. AfterText and BeforeText
// keep the raw value as typed so the badge row can echo it back.
After *time.Time
Before *time.Time
AfterText string
BeforeText string
FreeText string // remaining non-token words
}
SearchFilter holds structured filter tokens extracted from the search bar input. Each field corresponds to a supported token prefix (e.g., "repo:dispatch"). FreeText contains the remaining query words that did not match any token.
func ParseSearchTokens ¶ added in v0.13.0
func ParseSearchTokens(input string) SearchFilter
ParseSearchTokens splits a raw search input string into structured filter tokens and remaining free text. Tokens use the format "key:value" with no space between key and value. Quoted values (e.g., repo:"my repo") are supported for values containing spaces. Unknown tokens are kept as free text.
func (SearchFilter) HasTokens ¶ added in v0.13.0
func (sf SearchFilter) HasTokens() bool
HasTokens reports whether any structured token was parsed.
func (SearchFilter) TokenSummary ¶ added in v0.13.0
func (sf SearchFilter) TokenSummary() string
TokenSummary returns a short description of active tokens suitable for display in the badge row. Returns an empty string when no tokens are active.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package components provides reusable Bubble Tea TUI components for dispatch.
|
Package components provides reusable Bubble Tea TUI components for dispatch. |
|
Package markdown provides Glamour-based markdown rendering for TUI preview panes.
|
Package markdown provides Glamour-based markdown rendering for TUI preview panes. |
|
Package styles — icons.go defines Nerd Font icon constants and a fallback mechanism for terminals without a Nerd Font installed.
|
Package styles — icons.go defines Nerd Font icon constants and a fallback mechanism for terminals without a Nerd Font installed. |