list

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const WelcomePreview = `` /* 389-byte string literal not displayed */

WelcomePreview is the default preview content before any selection.

Variables

This section is empty.

Functions

func HeightForItems

func HeightForItems(items []list.Item) int

HeightForItems picks a delegate row height for the given list items.

func PanelToListItems

func PanelToListItems(items []panel.Item) []bubbleslist.Item

PanelToListItems converts panel rows for bubbles/list.

func PreviewFileCmd

func PreviewFileCmd(h BridgeHost, path string) tea.Cmd

PreviewFileCmd loads markdown preview for a file path in the inspect tree.

func SelectMCPByName

func SelectMCPByName(h BridgeHost, name string) bool

SelectMCPByName selects the named MCP row on the active list.

func SelectSkillByName

func SelectSkillByName(h BridgeHost, name string) bool

SelectSkillByName switches to listing and selects the named skill row.

func SetMainItemsFromPanel

func SetMainItemsFromPanel(h BridgeHost, items []panel.Item)

SetMainItemsFromPanel converts panel rows and applies them to the main list.

func SyncSelectionPreview

func SyncSelectionPreview(h BridgeHost) tea.Cmd

SyncSelectionPreview refreshes the preview pane for the current main-list selection.

Types

type BridgeHost

type BridgeHost interface {
	ListPane() *Pane
	ActiveTab() panel.Tab
	ActivePanel() panel.Panel
	AppWidth() int
	Styles() theme.Styles
	TransitionTo(session.State) bool
	RefreshActiveList()
	FindSkillByName(string) (*skilldomain.Skill, bool)
}

BridgeHost exposes list/preview selection helpers on the app Model.

type Delegate

type Delegate struct {
	// contains filtered or unexported fields
}

Delegate renders panel list rows.

func NewDelegate

func NewDelegate(styles theme.Styles) *Delegate

NewDelegate returns a list item delegate with default row height.

func (*Delegate) Height

func (d *Delegate) Height() int

func (*Delegate) Render

func (d *Delegate) Render(w io.Writer, m list.Model, index int, item list.Item)

func (*Delegate) SetHeight

func (d *Delegate) SetHeight(h int)

func (*Delegate) Spacing

func (d *Delegate) Spacing() int

func (*Delegate) Styles

func (d *Delegate) Styles() theme.Styles

Styles returns the delegate's theme (for tests).

func (*Delegate) Update

func (d *Delegate) Update(_ tea.Msg, _ *list.Model) tea.Cmd

type FileTree

type FileTree struct {
	// contains filtered or unexported fields
}

FileTree is the inspect-mode file browser.

func NewFileTree

func NewFileTree(styles theme.Styles) FileTree

NewFileTree returns an empty file tree list.

func (*FileTree) SelectedNode

func (m *FileTree) SelectedNode() TreeNode

SelectedNode returns the currently selected tree row.

func (*FileTree) SetRoot

func (m *FileTree) SetRoot(root string)

func (*FileTree) SetSize

func (m *FileTree) SetSize(width, height int)

func (*FileTree) SetStyles

func (m *FileTree) SetStyles(s theme.Styles)

func (*FileTree) Update

func (m *FileTree) Update(msg tea.Msg) (FileTree, tea.Cmd)

func (*FileTree) View

func (m *FileTree) View() string

type Pane

type Pane struct {
	Main        list.Model
	MainDel     *Delegate
	Agent       list.Model
	AgentDel    *Delegate
	Preview     viewport.Model
	PreviewBody string
	PreviewGen  int
	Tree        FileTree
}

Pane owns the main list, overlay list (bind / agent filter), preview, and inspect tree.

func NewPane

func NewPane(styles theme.Styles) Pane

NewPane builds list/preview/tree widgets with default welcome content.

func (*Pane) ApplyTheme

func (p *Pane) ApplyTheme(styles theme.Styles)

func (*Pane) ConfigureKeys

func (p *Pane) ConfigureKeys()

ConfigureKeys wires bubbletea keymaps from uikeys.

func (*Pane) PreviewWidth

func (p *Pane) PreviewWidth(fallback int) int

PreviewWidth returns preview width or fallback when unset.

func (*Pane) Resize

func (p *Pane) Resize(lw, lh, rw, rh int)

func (*Pane) SelectedItem

func (p *Pane) SelectedItem() (panel.Item, bool)

func (*Pane) SetMainItems

func (p *Pane) SetMainItems(items []list.Item)

func (*Pane) SetOverlayItems

func (p *Pane) SetOverlayItems(items []list.Item)

type TreeNode

type TreeNode struct {
	Path  string
	Name  string
	IsDir bool
	Depth int
}

TreeNode is one row in the inspect file tree.

Jump to

Keyboard shortcuts

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