tour

package
v1.98.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package tour implements the interactive getting-started tour: a floating card that teaches docker agent by doing. Each step waits for the user to actually perform the action it describes (send a message, approve a tool call, open the palette…) and observes the TUI's message stream to detect completion. The card never steals focus: the user drives the real UI.

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 tour engine plus its floating card. The zero value is inactive; use New.

func New

func New() *Model

New returns an inactive tour with the built-in steps.

func (*Model) Active

func (m *Model) Active() bool

Active reports whether the tour is currently running.

func (*Model) Advance

func (m *Model) Advance() tea.Cmd

Advance is the manual progression driven by the Enter key: it skips the celebration wait, moves past a read step, or skips an action step the user does not want to perform.

func (*Model) Layer

func (m *Model) Layer() *lipgloss.Layer

Layer returns the floating card as a lipgloss layer anchored to the bottom-right of the content area, below the sidebar's agent info and tools so it hides as little as possible. Nil when the tour is inactive.

func (*Model) Observe

func (m *Model) Observe(msg tea.Msg) tea.Cmd

Observe inspects a message flowing through the TUI and completes the current step when the user performed its action. It never consumes the message; the returned command only drives the tour's own progression.

func (*Model) OnLastStep

func (m *Model) OnLastStep() bool

OnLastStep reports whether the tour is showing its final step.

func (*Model) Quit

func (m *Model) Quit() tea.Cmd

Quit stops the tour early and reports it as not completed.

func (*Model) SetSize

func (m *Model) SetSize(width, height, contentBottom int)

SetSize records the window size and the row where the content area ends (just above the resize handle), both used to position the card.

func (*Model) Start

func (m *Model) Start()

Start (re)starts the tour from the first step.

Jump to

Keyboard shortcuts

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