threadpicker

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package threadpicker provides thread selection UI for fabric channels.

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 holds the thread picker state.

func New

func New() Model

New creates a new thread picker model.

func (Model) Activate

func (m Model) Activate(threads []domain.Thread) Model

Activate opens the picker with the given threads.

func (Model) Deactivate

func (m Model) Deactivate() Model

Deactivate closes the picker.

func (Model) HandleKey

func (m Model) HandleKey(msg tea.KeyMsg) (Model, bool, *domain.Thread)

HandleKey processes key events during picker display. Returns (updated model, consumed bool, selected *domain.Thread if enter pressed).

func (Model) IsActive

func (m Model) IsActive() bool

IsActive returns whether the picker is currently showing.

func (Model) Next

func (m Model) Next() Model

Next moves to the next item.

func (Model) Prev

func (m Model) Prev() Model

Prev moves to the previous item.

func (Model) Selected

func (m Model) Selected() *domain.Thread

Selected returns the currently selected thread, or nil if none.

func (Model) SetThreads

func (m Model) SetThreads(threads []domain.Thread) Model

SetThreads updates the list of available threads.

func (Model) ThreadCount

func (m Model) ThreadCount() int

ThreadCount returns the number of available threads.

func (Model) UpdateQuery

func (m Model) UpdateQuery(query string) (Model, bool)

UpdateQuery updates the filter query and re-filters. Returns false if no matches (caller may choose to keep open or close).

func (Model) View

func (m Model) View(maxWidth int) string

View renders the thread picker popup.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL