programstatus

package
v1.150.0 Latest Latest
Warning

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

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

Documentation

Overview

Package programstatus reports application state using the OSC 7501 protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

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

Reporter coalesces output. All methods run on the UI loop, or after it exits.

func (*Reporter) Finish

func (r *Reporter) Finish(out io.Writer)

Finish retires transient state while preserving completed results on exit.

func (*Reporter) Set

func (r *Reporter) Set(status Status) bool

Set updates the desired status and reports whether it changed.

func (*Reporter) String

func (r *Reporter) String() string

String encodes the latest state at write time, not when a command was queued. This prevents asynchronous Bubble Tea commands from publishing stale states.

type Session

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

Session tracks a conversation independently of whether its UI is visible.

func (*Session) Acknowledge

func (s *Session) Acknowledge()

Acknowledge dismisses a result when the user interacts with its conversation.

func (*Session) Apply

func (s *Session) Apply(sessionID string, msg tea.Msg)

Apply consumes accepted runtime events. Only the outer foreground stream finishes a turn; detached prompts survive foreground boundaries.

func (*Session) Cancel

func (s *Session) Cancel(sessionID string)

Cancel marks an interrupted foreground run idle, not successfully completed.

func (*Session) Finish

func (s *Session) Finish(sessionID, reason string)

Finish marks the outer UI operation complete, including pre-stream failures.

func (*Session) FinishSetup

func (s *Session) FinishSetup(sessionID, reason string)

FinishSetup handles a fork that stopped before its first stream started.

func (*Session) Resolve

func (s *Session) Resolve(event tea.Msg)

Resolve retires an answered prompt without acknowledging other prompts.

func (*Session) Start

func (s *Session) Start(sessionID string)

Start marks new foreground work before its first runtime event arrives.

func (*Session) Status

func (s *Session) Status() Status

Status returns the oldest unanswered prompt, or the conversation's state.

type Status

type Status struct {
	State string
	Kind  string
	Msg   string
}

Status describes one aggregate application state.

func Aggregate

func Aggregate(statuses []Status) Status

Aggregate gives unanswered prompts precedence over work and results. The caller supplies statuses in a stable order to break ties.

func (Status) Sequence

func (s Status) Sequence() string

Sequence encodes a root record, replacing all its previous keys.

Jump to

Keyboard shortcuts

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