Documentation
¶
Index ¶
- Constants
- type Action
- type BuildInfo
- type CommandEntry
- type CommandPalette
- func (p *CommandPalette) Cancelled() bool
- func (p *CommandPalette) IsFiltering() bool
- func (p *CommandPalette) KeyMap() []key.Binding
- func (p *CommandPalette) Overlay(background string, width, height int) string
- func (p *CommandPalette) SelectedCommand() (*CommandEntry, []string, bool)
- func (p *CommandPalette) Session() *session.Session
- func (p *CommandPalette) Update(msg tea.Msg) (*CommandPalette, tea.Cmd)
- func (p *CommandPalette) View() string
- type Deps
- type HiveDocReviewCmd
- type HoneycombOnlyModel
- type HoneycombOnlyOptions
- type KVView
- func (v *KVView) AddFilterRune(r rune)
- func (v *KVView) CancelFilter()
- func (v *KVView) ConfirmFilter()
- func (v *KVView) DeleteFilterRune()
- func (v *KVView) IsFiltering() bool
- func (v *KVView) MoveDown()
- func (v *KVView) MoveUp()
- func (v *KVView) ScrollPreviewDown()
- func (v *KVView) ScrollPreviewUp()
- func (v *KVView) SelectAtRow(x, contentY int) tea.Cmd
- func (v *KVView) SelectedKey() string
- func (v *KVView) SetKeys(keys []string)
- func (v *KVView) SetPreview(entry *kv.Entry)
- func (v *KVView) SetSize(width, height int)
- func (v *KVView) StartFilter()
- func (v *KVView) View() string
- type KeybindingResolver
- func (h *KeybindingResolver) HelpEntries() []string
- func (h *KeybindingResolver) HelpString() string
- func (h *KeybindingResolver) IsAction(key string, t action.Type) bool
- func (h *KeybindingResolver) IsCommand(key string, cmdName string) bool
- func (h *KeybindingResolver) KeyBindings() []key.Binding
- func (h *KeybindingResolver) RenderWithFormData(name string, cmd config.UserCommand, sess session.Session, args []string, ...) Action
- func (h *KeybindingResolver) Resolve(key string, sess session.Session) (Action, bool)
- func (h *KeybindingResolver) ResolveAction(key string) (Action, bool)
- func (h *KeybindingResolver) ResolveFormCommand(key string, sess session.Session) (string, config.UserCommand, bool)
- func (h *KeybindingResolver) ResolveUserCommand(name string, cmd config.UserCommand, sess session.Session, args []string) Action
- func (h *KeybindingResolver) SetActiveView(view ViewType)
- func (h *KeybindingResolver) SetSelectedWindow(windowName string)
- func (h *KeybindingResolver) SetTmuxWindowLookup(fn func(sessionID string) string)
- func (h *KeybindingResolver) SetToolLookup(fn func(sessionID string) string)
- type Modal
- type ModalCoordinator
- func (mc *ModalCoordinator) ClearFormState()
- func (mc *ModalCoordinator) DismissConfirm()
- func (mc *ModalCoordinator) DismissHelp()
- func (mc *ModalCoordinator) DismissInfo()
- func (mc *ModalCoordinator) DismissNotifications()
- func (mc *ModalCoordinator) DismissTodoPanel()
- func (mc *ModalCoordinator) HasEditorFocus(state UIState) bool
- func (mc *ModalCoordinator) Overlay(state UIState, bg string, s spinner.Model, loadingMsg string) string
- func (mc *ModalCoordinator) SetSize(w, h int)
- func (mc *ModalCoordinator) ShowConfirm(title, message string)
- func (mc *ModalCoordinator) ShowHelp(title string, sections []components.HelpDialogSection)
- func (mc *ModalCoordinator) ShowInfo(title string, sections []components.InfoSection, footer, helpText string)
- func (mc *ModalCoordinator) ShowNotifications(store notify.Store)
- func (mc *ModalCoordinator) ShowOutputModal(title string)
- func (mc *ModalCoordinator) ShowTodoPanel(service *hive.TodoService)
- type Model
- type NewSessionForm
- type NewSessionFormResult
- type NotificationBuffer
- type NotificationModal
- type Opts
- type OutputModal
- func (m *OutputModal) AddLine(line string)
- func (m *OutputModal) AdvanceFrame()
- func (m *OutputModal) IsRunning() bool
- func (m OutputModal) Overlay(background string, width, height int) string
- func (m *OutputModal) SetComplete(err error)
- func (m *OutputModal) SetSpinner(s spinner.Model)
- func (m *OutputModal) Spinner() spinner.Model
- type ParsedCommand
- type RepoPicker
- type ReviewOnlyModel
- type ReviewOnlyOptions
- type SelectField
- func (s *SelectField) Blur()
- func (s *SelectField) Focus() tea.Cmd
- func (s *SelectField) Focused() bool
- func (s *SelectField) IsFiltering() bool
- func (s *SelectField) KeyMap() []key.Binding
- func (s *SelectField) SelectedIndex() int
- func (s *SelectField) SetSize(width, height int)
- func (s SelectField) Update(msg tea.Msg) (SelectField, tea.Cmd)
- func (s SelectField) View() string
- type SelectItem
- type ToastController
- type ToastView
- type TodoPanel
- func (p *TodoPanel) AcknowledgeCurrent() error
- func (p *TodoPanel) AcknowledgeErrorCount() int
- func (p *TodoPanel) CompleteCurrent() error
- func (p *TodoPanel) CurrentItem() *todo.Todo
- func (p *TodoPanel) CycleFilter()
- func (p *TodoPanel) DismissCurrent() error
- func (p *TodoPanel) MoveDown()
- func (p *TodoPanel) MoveUp()
- func (p *TodoPanel) OpenCount() int
- func (p *TodoPanel) Overlay(background string, width, height int) string
- func (p *TodoPanel) PendingCount() int
- func (p *TodoPanel) ReopenCurrent() error
- func (p *TodoPanel) ScrollDown()
- func (p *TodoPanel) ScrollUp()
- type UIState
- type ViewType
Constants ¶
const ( // MaxVisibleCommands is the maximum number of commands shown in the palette. MaxVisibleCommands = 12 // CommandPaletteWidth is the content width of the command palette modal. CommandPaletteWidth = 90 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandEntry ¶
type CommandEntry struct {
Name string
Command config.UserCommand
}
CommandEntry represents an item in the command palette.
type CommandPalette ¶
type CommandPalette struct {
// contains filtered or unexported fields
}
CommandPalette is a vim-style command palette for user commands.
func NewCommandPalette ¶
func NewCommandPalette(cmds map[string]config.UserCommand, sess *session.Session, width, height int, activeView ViewType) *CommandPalette
NewCommandPalette creates a new command palette with the given commands. Commands are filtered by scope - only commands active in the current view are shown.
func (*CommandPalette) Cancelled ¶
func (p *CommandPalette) Cancelled() bool
Cancelled returns true if the user cancelled the palette.
func (*CommandPalette) IsFiltering ¶
func (p *CommandPalette) IsFiltering() bool
IsFiltering returns whether the palette is currently filtering. Always true for the new text input-based palette.
func (*CommandPalette) KeyMap ¶
func (p *CommandPalette) KeyMap() []key.Binding
KeyMap returns keys that the command palette uses (for help integration).
func (*CommandPalette) Overlay ¶
func (p *CommandPalette) Overlay(background string, width, height int) string
Overlay renders the command palette as a layer over the given background.
func (*CommandPalette) SelectedCommand ¶
func (p *CommandPalette) SelectedCommand() (*CommandEntry, []string, bool)
SelectedCommand returns the selected command entry and parsed args, if any.
func (*CommandPalette) Session ¶
func (p *CommandPalette) Session() *session.Session
Session returns the session context for template rendering.
func (*CommandPalette) Update ¶
func (p *CommandPalette) Update(msg tea.Msg) (*CommandPalette, tea.Cmd)
Update handles messages for the command palette.
func (*CommandPalette) View ¶
func (p *CommandPalette) View() string
View renders the command palette.
type Deps ¶ added in v0.32.0
type Deps struct {
// Required — nil causes a panic at construction time.
Config *config.Config
Service *hive.SessionService
Renderer *tmpl.Renderer
TerminalManager *terminal.Manager
PluginManager *plugins.Manager
TodoService *hive.TodoService
DB *db.DB
// Optional — nil disables the corresponding feature.
MsgStore *hive.MessageService
Bus *eventbus.EventBus
KVStore corekv.KV
BuildInfo BuildInfo
DoctorService *hive.DoctorService
Honeycomb *hive.HoneycombService
}
Deps holds all external dependencies for the TUI Model.
type HiveDocReviewCmd ¶
type HiveDocReviewCmd struct {
Arg string // Optional document path argument
}
HiveDocReviewCmd switches to the Docs tab, opening a specific document if Arg is set.
type HoneycombOnlyModel ¶ added in v0.43.0
type HoneycombOnlyModel struct {
// contains filtered or unexported fields
}
HoneycombOnlyModel is a minimal TUI for browsing and mutating honeycomb tasks.
func NewHoneycombOnly ¶ added in v0.43.0
func NewHoneycombOnly(opts HoneycombOnlyOptions) HoneycombOnlyModel
NewHoneycombOnly creates a new honeycomb-only TUI model.
func (HoneycombOnlyModel) Init ¶ added in v0.43.0
func (m HoneycombOnlyModel) Init() tea.Cmd
Init implements tea.Model.
func (HoneycombOnlyModel) View ¶ added in v0.43.0
func (m HoneycombOnlyModel) View() tea.View
View implements tea.Model.
type HoneycombOnlyOptions ¶ added in v0.43.0
type HoneycombOnlyOptions struct {
Honeycomb *hive.HoneycombService
RepoKey string
Config *config.Config
KVStore corekv.KV
Renderer *tmpl.Renderer
}
HoneycombOnlyOptions configures the honeycomb-only TUI.
type KVView ¶
type KVView struct {
// contains filtered or unexported fields
}
KVView is a two-column KV browser: searchable key list (left) + colorized JSON preview (right).
func (*KVView) AddFilterRune ¶
AddFilterRune adds a character to the filter.
func (*KVView) CancelFilter ¶
func (v *KVView) CancelFilter()
CancelFilter clears the filter and exits filtering mode.
func (*KVView) ConfirmFilter ¶
func (v *KVView) ConfirmFilter()
ConfirmFilter exits filtering mode, keeping the filter active.
func (*KVView) DeleteFilterRune ¶
func (v *KVView) DeleteFilterRune()
DeleteFilterRune removes the last character from the filter.
func (*KVView) IsFiltering ¶
IsFiltering returns whether the view is in filter mode.
func (*KVView) MoveDown ¶
func (v *KVView) MoveDown()
MoveDown moves the cursor down in the key list.
func (*KVView) ScrollPreviewDown ¶
func (v *KVView) ScrollPreviewDown()
ScrollPreviewDown scrolls the JSON preview down.
func (*KVView) ScrollPreviewUp ¶
func (v *KVView) ScrollPreviewUp()
ScrollPreviewUp scrolls the JSON preview up.
func (*KVView) SelectAtRow ¶ added in v0.47.0
SelectAtRow moves the cursor to the key at contentY rows from the view top. The key list renders a one-line header and, when filtering is active, a filter line. Clicks in the preview pane (right of the key list) are ignored.
func (*KVView) SelectedKey ¶
SelectedKey returns the currently selected key, or empty if none.
func (*KVView) SetPreview ¶
SetPreview sets the preview entry for the selected key.
type KeybindingResolver ¶
type KeybindingResolver struct {
// contains filtered or unexported fields
}
KeybindingResolver resolves keybindings to actions via UserCommands. It handles resolution only - execution is handled by the command.Service.
func NewKeybindingResolver ¶
func NewKeybindingResolver( viewKeybindings map[string]map[string]config.Keybinding, commands map[string]config.UserCommand, renderer *tmpl.Renderer, ) *KeybindingResolver
NewKeybindingResolver creates a new resolver with per-view keybinding maps. Commands should be the merged user commands (user config + system defaults).
func (*KeybindingResolver) HelpEntries ¶
func (h *KeybindingResolver) HelpEntries() []string
HelpEntries returns all configured keybindings for display, sorted by key. Only returns keybindings that are in scope for the current view.
func (*KeybindingResolver) HelpString ¶
func (h *KeybindingResolver) HelpString() string
HelpString returns a formatted help string for all keybindings.
func (*KeybindingResolver) IsAction ¶
func (h *KeybindingResolver) IsAction(key string, t action.Type) bool
IsAction checks if a key maps to the given built-in action.
func (*KeybindingResolver) IsCommand ¶
func (h *KeybindingResolver) IsCommand(key string, cmdName string) bool
IsCommand checks if a key maps to the given command name.
func (*KeybindingResolver) KeyBindings ¶
func (h *KeybindingResolver) KeyBindings() []key.Binding
KeyBindings returns key.Binding objects for integration with bubbles help system. Only returns keybindings that are in scope for the current view.
func (*KeybindingResolver) RenderWithFormData ¶
func (h *KeybindingResolver) RenderWithFormData( name string, cmd config.UserCommand, sess session.Session, args []string, formData map[string]any, ) Action
RenderWithFormData resolves a user command with form data injected into the template context under the .Form namespace.
func (*KeybindingResolver) Resolve ¶
Resolve attempts to resolve a key press to an action for the given session. Recycled sessions only allow delete actions to prevent accidental operations.
func (*KeybindingResolver) ResolveAction ¶ added in v0.38.0
func (h *KeybindingResolver) ResolveAction(key string) (Action, bool)
ResolveAction resolves a key press to an action without session context. Used by views (like tasks) that don't operate on sessions. Only resolves built-in action commands -- shell commands are skipped.
func (*KeybindingResolver) ResolveFormCommand ¶
func (h *KeybindingResolver) ResolveFormCommand(key string, sess session.Session) (string, config.UserCommand, bool)
ResolveFormCommand checks if a key maps to a user command with form fields. Returns the command name and command if found, after scope and recycle checks.
func (*KeybindingResolver) ResolveUserCommand ¶
func (h *KeybindingResolver) ResolveUserCommand(name string, cmd config.UserCommand, sess session.Session, args []string) Action
ResolveUserCommand converts a user command to an Action ready for execution. The name is used to display the command source (e.g., ":review"). Supports both action-based commands (recycle, delete) and shell commands.
func (*KeybindingResolver) SetActiveView ¶
func (h *KeybindingResolver) SetActiveView(view ViewType)
SetActiveView updates the current active view for scope checking and rebuilds the effective keybinding map.
func (*KeybindingResolver) SetSelectedWindow ¶
func (h *KeybindingResolver) SetSelectedWindow(windowName string)
SetSelectedWindow overrides the TmuxWindow template value for the next resolve call. The override is consumed (cleared) after each Resolve or ResolveUserCommand call. Pass empty string to clear the override and fall back to the lookup function.
func (*KeybindingResolver) SetTmuxWindowLookup ¶
func (h *KeybindingResolver) SetTmuxWindowLookup(fn func(sessionID string) string)
SetTmuxWindowLookup sets a function that resolves tmux window names for sessions. This enables the TmuxWindow field in shell command templates.
func (*KeybindingResolver) SetToolLookup ¶
func (h *KeybindingResolver) SetToolLookup(fn func(sessionID string) string)
SetToolLookup sets a function that resolves tool names for sessions.
type Modal ¶
type Modal struct {
// contains filtered or unexported fields
}
Modal represents a confirmation dialog.
func NewDangerousModal ¶ added in v0.44.0
NewDangerousModal creates a modal rendered in error colours that requires the user to type requireText (e.g. "delete") before confirming. The cancel button is selected by default to reduce accidental confirmation.
func (Modal) ConfirmSelected ¶
ConfirmSelected returns true if the action should proceed. In text-input mode this means the typed text matches requireText; in button mode it means the confirm button is selected.
func (*Modal) DeleteChar ¶ added in v0.44.0
func (m *Modal) DeleteChar()
DeleteChar removes the last character from the typed text.
func (Modal) IsTextInput ¶ added in v0.44.0
IsTextInput reports whether this modal uses text-confirmation instead of buttons.
func (*Modal) ToggleSelection ¶
func (m *Modal) ToggleSelection()
ToggleSelection switches the selected button (button mode only).
type ModalCoordinator ¶ added in v0.32.0
type ModalCoordinator struct {
// Modal components
Confirm Modal
Output OutputModal
NewSession *NewSessionForm
CommandPalette *CommandPalette
Help *components.HelpDialog
Notification *NotificationModal
InfoDialog *components.InfoDialog
FormDialog *form.Dialog
RepoPicker *RepoPicker
DocsRepoEntries []docsRepoEntry
TodoPanel *TodoPanel
RenameInput textinput.Model
RenameSessionID string
GroupInput textinput.Model
GroupSessionID string
// Pending action state
Pending Action
PendingRecycledSessions []session.Session
PendingFormCmd config.UserCommand
PendingFormName string
PendingFormSess *session.Session
PendingFormArgs []string
// Streaming (create, recycle, etc.)
StreamOutput <-chan string
StreamDone <-chan error
StreamCancel context.CancelFunc
StreamResult streamResult // session metadata from create operations
// Background streaming (dismissed but still running)
BgStreamOutput <-chan string
BgStreamDone <-chan error
BgStreamCancel context.CancelFunc
BgStreamResult streamResult
BgStreamTitle string
// contains filtered or unexported fields
}
ModalCoordinator owns all modal component references, pending action state, streaming state, and provides overlay rendering plus lifecycle methods.
func NewModalCoordinator ¶ added in v0.32.0
func NewModalCoordinator() *ModalCoordinator
NewModalCoordinator creates a new ModalCoordinator with default state.
func (*ModalCoordinator) ClearFormState ¶ added in v0.32.0
func (mc *ModalCoordinator) ClearFormState()
ClearFormState resets all form dialog state.
func (*ModalCoordinator) DismissConfirm ¶ added in v0.32.0
func (mc *ModalCoordinator) DismissConfirm()
DismissConfirm resets the confirm modal to zero value.
func (*ModalCoordinator) DismissHelp ¶ added in v0.32.0
func (mc *ModalCoordinator) DismissHelp()
DismissHelp closes the help dialog.
func (*ModalCoordinator) DismissInfo ¶ added in v0.32.0
func (mc *ModalCoordinator) DismissInfo()
DismissInfo closes the info dialog.
func (*ModalCoordinator) DismissNotifications ¶ added in v0.32.0
func (mc *ModalCoordinator) DismissNotifications()
DismissNotifications closes the notification modal.
func (*ModalCoordinator) DismissTodoPanel ¶ added in v0.34.0
func (mc *ModalCoordinator) DismissTodoPanel()
DismissTodoPanel closes the todo panel.
func (*ModalCoordinator) HasEditorFocus ¶ added in v0.32.0
func (mc *ModalCoordinator) HasEditorFocus(state UIState) bool
HasEditorFocus returns true if a modal with text input is active.
func (*ModalCoordinator) Overlay ¶ added in v0.32.0
func (mc *ModalCoordinator) Overlay(state UIState, bg string, s spinner.Model, loadingMsg string) string
Overlay renders the appropriate modal overlay based on the current UI state. It returns the background string unchanged if no modal is active.
func (*ModalCoordinator) SetSize ¶ added in v0.32.0
func (mc *ModalCoordinator) SetSize(w, h int)
SetSize updates the available dimensions for modal rendering.
func (*ModalCoordinator) ShowConfirm ¶ added in v0.32.0
func (mc *ModalCoordinator) ShowConfirm(title, message string)
ShowConfirm creates and displays the confirmation modal.
func (*ModalCoordinator) ShowHelp ¶ added in v0.32.0
func (mc *ModalCoordinator) ShowHelp(title string, sections []components.HelpDialogSection)
ShowHelp creates and displays the help dialog.
func (*ModalCoordinator) ShowInfo ¶ added in v0.32.0
func (mc *ModalCoordinator) ShowInfo(title string, sections []components.InfoSection, footer, helpText string)
ShowInfo creates and displays the info dialog.
func (*ModalCoordinator) ShowNotifications ¶ added in v0.32.0
func (mc *ModalCoordinator) ShowNotifications(store notify.Store)
ShowNotifications creates and displays the notification modal.
func (*ModalCoordinator) ShowOutputModal ¶ added in v0.32.0
func (mc *ModalCoordinator) ShowOutputModal(title string)
ShowOutputModal creates and displays the output modal.
func (*ModalCoordinator) ShowTodoPanel ¶ added in v0.34.0
func (mc *ModalCoordinator) ShowTodoPanel(service *hive.TodoService)
ShowTodoPanel creates and displays the todo action panel.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main Bubble Tea model for the TUI.
type NewSessionForm ¶
type NewSessionForm struct {
// contains filtered or unexported fields
}
NewSessionForm manages the new session creation form.
func NewNewSessionForm ¶
func NewNewSessionForm(repos []workspace.DiscoveredRepo, preselectedRemote string, existingNames map[string]bool) *NewSessionForm
NewNewSessionForm creates a new session form with the given repos. If preselectedRemote is non-empty, the matching repo will be pre-selected. existingNames is used to validate that the session name is unique.
func (*NewSessionForm) Cancelled ¶
func (f *NewSessionForm) Cancelled() bool
Cancelled returns true if the form was cancelled.
func (*NewSessionForm) Init ¶
func (f *NewSessionForm) Init() tea.Cmd
Init returns the initial command for the form.
func (*NewSessionForm) Result ¶
func (f *NewSessionForm) Result() NewSessionFormResult
Result returns the form result. Only valid if Submitted() is true. Returns zero value if repos slice is empty (should not happen in normal use).
func (*NewSessionForm) Submitted ¶
func (f *NewSessionForm) Submitted() bool
Submitted returns true if the form was submitted.
func (*NewSessionForm) Update ¶
func (f *NewSessionForm) Update(msg tea.Msg) (NewSessionForm, tea.Cmd)
Update handles messages for the form.
type NewSessionFormResult ¶
type NewSessionFormResult struct {
Repo workspace.DiscoveredRepo
SessionName string
}
NewSessionFormResult contains the form submission result.
type NotificationBuffer ¶ added in v0.37.1
type NotificationBuffer struct {
// contains filtered or unexported fields
}
NotificationBuffer buffers notifications and emits coalesced drain signals.
func NewNotificationBuffer ¶ added in v0.37.1
func NewNotificationBuffer() *NotificationBuffer
NewNotificationBuffer constructs a buffer for async notification delivery.
func (*NotificationBuffer) Drain ¶ added in v0.37.1
func (b *NotificationBuffer) Drain() []notify.Notification
Drain returns all buffered notifications and clears the buffer.
func (*NotificationBuffer) Push ¶ added in v0.37.1
func (b *NotificationBuffer) Push(n notify.Notification)
Push appends a notification and emits a non-blocking drain signal.
func (*NotificationBuffer) WaitForSignal ¶ added in v0.37.1
func (b *NotificationBuffer) WaitForSignal() tea.Cmd
WaitForSignal blocks until there are notifications ready to drain.
type NotificationModal ¶
type NotificationModal struct {
// contains filtered or unexported fields
}
NotificationModal displays a scrollable history of notifications.
func NewNotificationModal ¶
func NewNotificationModal(store notify.Store, width, height int) *NotificationModal
NewNotificationModal creates a modal showing notification history.
func (*NotificationModal) Clear ¶
func (m *NotificationModal) Clear() error
Clear deletes all notifications and refreshes the view.
func (*NotificationModal) Overlay ¶
func (m *NotificationModal) Overlay(background string, width, height int) string
Overlay renders the notification modal centered over the background.
func (*NotificationModal) ScrollDown ¶
func (m *NotificationModal) ScrollDown()
ScrollDown scrolls the viewport down.
func (*NotificationModal) ScrollUp ¶
func (m *NotificationModal) ScrollUp()
ScrollUp scrolls the viewport up.
type Opts ¶ added in v0.32.0
type Opts struct {
LocalRemote string
Source string // Source directory for file copying (cwd)
Warnings []string
ConfigPath string
}
Opts holds runtime options that are not service dependencies.
type OutputModal ¶
type OutputModal struct {
// contains filtered or unexported fields
}
OutputModal displays streaming command output in a modal dialog.
func NewOutputModal ¶
func NewOutputModal(title string) OutputModal
NewOutputModal creates a new output modal with the given title.
func (*OutputModal) AddLine ¶
func (m *OutputModal) AddLine(line string)
AddLine appends a line of output to the modal.
func (*OutputModal) AdvanceFrame ¶ added in v0.36.0
func (m *OutputModal) AdvanceFrame()
AdvanceFrame increments the animation frame counter.
func (*OutputModal) IsRunning ¶
func (m *OutputModal) IsRunning() bool
IsRunning returns true if the command is still running.
func (OutputModal) Overlay ¶
func (m OutputModal) Overlay(background string, width, height int) string
Overlay renders the output modal centered over the background.
func (*OutputModal) SetComplete ¶
func (m *OutputModal) SetComplete(err error)
SetComplete marks the modal as complete with optional error.
func (*OutputModal) SetSpinner ¶
func (m *OutputModal) SetSpinner(s spinner.Model)
SetSpinner updates the spinner model.
func (*OutputModal) Spinner ¶
func (m *OutputModal) Spinner() spinner.Model
Spinner returns the spinner model for tick updates.
type ParsedCommand ¶
ParsedCommand represents a parsed command input.
func ParseCommandInput ¶
func ParseCommandInput(input string) ParsedCommand
ParseCommandInput parses a command string like ":command arg1 arg2" into name and args. The input should start with ':' but it's optional. Arguments are split by whitespace.
type RepoPicker ¶ added in v0.38.0
type RepoPicker struct {
// contains filtered or unexported fields
}
RepoPicker is a simple modal for selecting a repository scope.
func NewRepoPicker ¶ added in v0.38.0
func NewRepoPicker(repos []string, currentRepo string, width, height int) *RepoPicker
NewRepoPicker creates a new repository picker modal.
func (*RepoPicker) Cancelled ¶ added in v0.38.0
func (p *RepoPicker) Cancelled() bool
Cancelled returns true if the user dismissed the picker.
func (*RepoPicker) Overlay ¶ added in v0.38.0
func (p *RepoPicker) Overlay(bg string, w, h int) string
Overlay renders the picker centered over the background.
func (*RepoPicker) Selected ¶ added in v0.38.0
func (p *RepoPicker) Selected() string
Selected returns the chosen repo key, or empty string if none selected.
func (*RepoPicker) Update ¶ added in v0.38.0
func (p *RepoPicker) Update(msg tea.Msg) (*RepoPicker, tea.Cmd)
Update handles key events for the repo picker.
func (*RepoPicker) View ¶ added in v0.38.0
func (p *RepoPicker) View() string
View renders the picker content.
type ReviewOnlyModel ¶
type ReviewOnlyModel struct {
// contains filtered or unexported fields
}
ReviewOnlyModel is a minimal TUI for reviewing context documents.
func NewReviewOnly ¶
func NewReviewOnly(opts ReviewOnlyOptions) ReviewOnlyModel
NewReviewOnly creates a new review-only TUI model.
type ReviewOnlyOptions ¶
type ReviewOnlyOptions struct {
Documents []review.Document
InitialDoc *review.Document
ContextDir string // Directory for saving feedback files (e.g., context directory)
DB *db.DB
CopyCommand string // Shell command for copying to clipboard (e.g., "pbcopy" on macOS)
}
ReviewOnlyOptions configures the review-only TUI.
type SelectField ¶
type SelectField struct {
// contains filtered or unexported fields
}
SelectField is a select input component wrapping list.Model.
func NewSelectField ¶
func NewSelectField(title string, items []SelectItem, selected int) SelectField
NewSelectField creates a new select field with the given items. selected is the index to pre-select (-1 for none).
func (*SelectField) Focus ¶
func (s *SelectField) Focus() tea.Cmd
Focus sets focus state on the select field.
func (*SelectField) Focused ¶
func (s *SelectField) Focused() bool
Focused returns whether the field is focused.
func (*SelectField) IsFiltering ¶
func (s *SelectField) IsFiltering() bool
IsFiltering returns whether the list is currently filtering.
func (*SelectField) KeyMap ¶
func (s *SelectField) KeyMap() []key.Binding
KeyMap returns keys that the select field uses (for help integration).
func (*SelectField) SelectedIndex ¶
func (s *SelectField) SelectedIndex() int
SelectedIndex returns the index of the selected item.
func (*SelectField) SetSize ¶
func (s *SelectField) SetSize(width, height int)
SetSize sets the dimensions of the select field.
func (SelectField) Update ¶
func (s SelectField) Update(msg tea.Msg) (SelectField, tea.Cmd)
Update handles messages for the select field.
type SelectItem ¶
type SelectItem struct {
// contains filtered or unexported fields
}
SelectItem represents an item in a SelectField.
func (SelectItem) FilterValue ¶
func (i SelectItem) FilterValue() string
FilterValue implements list.Item.
type ToastController ¶
type ToastController struct {
// contains filtered or unexported fields
}
ToastController manages the lifecycle of active toast notifications. It handles push, eviction, TTL countdown, and dismissal.
func NewToastController ¶
func NewToastController() *ToastController
func (*ToastController) Dismiss ¶
func (c *ToastController) Dismiss()
Dismiss removes the newest (bottom-most) toast.
func (*ToastController) DismissAll ¶
func (c *ToastController) DismissAll()
DismissAll removes all active toasts.
func (*ToastController) HasToasts ¶
func (c *ToastController) HasToasts() bool
HasToasts returns true if there are any active toasts.
func (*ToastController) Push ¶
func (c *ToastController) Push(n notify.Notification)
Push adds a notification to the toast stack. If the stack exceeds defaultMaxToasts, the oldest toast is evicted.
func (*ToastController) Tick ¶
func (c *ToastController) Tick()
Tick removes any toasts whose expiration time has passed.
func (*ToastController) Toasts ¶
func (c *ToastController) Toasts() []toast
Toasts returns the current active toast slice.
type ToastView ¶
type ToastView struct {
// contains filtered or unexported fields
}
ToastView renders toast notifications and composites them as an overlay.
func NewToastView ¶
func NewToastView(controller *ToastController) *ToastView
type TodoPanel ¶ added in v0.34.0
type TodoPanel struct {
// contains filtered or unexported fields
}
TodoPanel displays an interactive list of todo items.
func NewTodoPanel ¶ added in v0.34.0
func NewTodoPanel(service *hive.TodoService, width, height int) *TodoPanel
NewTodoPanel creates a new interactive todo panel modal.
func (*TodoPanel) AcknowledgeCurrent ¶ added in v0.34.0
AcknowledgeCurrent marks the selected todo as acknowledged.
func (*TodoPanel) AcknowledgeErrorCount ¶ added in v0.34.0
AcknowledgeErrorCount returns the number of auto-acknowledge failures during panel open.
func (*TodoPanel) CompleteCurrent ¶ added in v0.34.0
CompleteCurrent marks the selected todo as completed.
func (*TodoPanel) CurrentItem ¶ added in v0.34.0
CurrentItem returns the todo item under the cursor, or nil if empty.
func (*TodoPanel) CycleFilter ¶ added in v0.34.0
func (p *TodoPanel) CycleFilter()
CycleFilter advances to the next filter tab.
func (*TodoPanel) DismissCurrent ¶ added in v0.34.0
DismissCurrent marks the selected todo as dismissed.
func (*TodoPanel) MoveDown ¶ added in v0.34.0
func (p *TodoPanel) MoveDown()
MoveDown moves the cursor down.
func (*TodoPanel) MoveUp ¶ added in v0.34.0
func (p *TodoPanel) MoveUp()
MoveUp moves the cursor up.
func (*TodoPanel) OpenCount ¶ added in v0.34.0
OpenCount returns the number of open (pending + acknowledged) items across all items.
func (*TodoPanel) Overlay ¶ added in v0.34.0
Overlay renders the todo panel centered over the background.
func (*TodoPanel) PendingCount ¶ added in v0.34.0
PendingCount returns the number of pending items across all items.
func (*TodoPanel) ReopenCurrent ¶ added in v0.39.0
ReopenCurrent reverts the selected completed or dismissed item back to acknowledged.
func (*TodoPanel) ScrollDown ¶ added in v0.34.0
func (p *TodoPanel) ScrollDown()
ScrollDown scrolls the viewport down.
Source Files
¶
- buildinfo.go
- command_palette.go
- command_parser.go
- form_factory.go
- hc_only.go
- keybindings.go
- kv_cmds.go
- kv_view.go
- modal.go
- modal_coordinator.go
- model.go
- model_handlers.go
- model_render.go
- new_session_form.go
- notification_buffer.go
- notification_modal.go
- output_modal.go
- polling.go
- repo_picker.go
- review_doc_cmd.go
- review_only.go
- select_field.go
- toast_controller.go
- toast_view.go
- todo_badge_state.go
- todo_panel.go
- update_cmd.go
- view.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package components provides reusable TUI components.
|
Package components provides reusable TUI components. |
|
views
|
|
|
review
Package review implements a TUI for reviewing and commenting on markdown documents.
|
Package review implements a TUI for reviewing and commenting on markdown documents. |