dev

package
v0.1.0-alpha.88 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserCancelled = errors.New("user cancelled")

Functions

func ViewBuildRange

func ViewBuildRange(m *Model, startView, endView string) string

ViewBuildRange renders the build view from startView to endView (inclusive) Returns empty string if views are not found

Types

type ErrorMsg

type ErrorMsg error

type FileChangeMsg

type FileChangeMsg struct{}

type Model

type Model struct {
	Err error

	Client      stainless.Client
	Ctx         context.Context
	Watch       bool
	IsCompleted bool

	Branch string

	Indent string

	Help        help.Model
	Build       build.Model
	Diagnostics diagnostics.Model
	// contains filtered or unexported fields
}

func NewModel

func NewModel(cfg ModelConfig) Model

func (Model) FullHelp

func (m Model) FullHelp() [][]key.Binding

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) ShortHelp

func (m Model) ShortHelp() []key.Binding

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type ModelConfig

type ModelConfig struct {
	Client        stainless.Client
	Ctx           context.Context
	Branch        string
	Start         func() (*stainless.Build, error)
	DownloadPaths map[stainless.Target]string
	Watch         bool
	Label         string   // Header label, defaults to "PREVIEW"
	WaitMode      WaitMode // When non-zero, auto-quits after diagnostics are fetched and build targets reach completion
	Indent        string   // Prefix for every non-empty output line (e.g. "  ")
}

type ViewPart

type ViewPart struct {
	Name string
	View func(*Model, *strings.Builder)
}

ViewPart represents a single part of the build view

type WaitMode

type WaitMode int

WaitMode represents the level of waiting for build completion.

const (
	WaitNone   WaitMode = iota // Don't wait
	WaitCommit                 // Wait for commit only
	WaitAll                    // Wait for everything including workflows
)

Jump to

Keyboard shortcuts

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