Help us shape the future of Go! Take the 2026 Go Developer Survey

tabstate

package
v1.151.0 Latest Latest
Warning

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

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

Documentation

Overview

Package tabstate holds the state shared by a tab and its runtime subscription.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

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

State is updated by the TUI event loop and read by supervisor snapshots. Its methods are safe for concurrent snapshot readers.

func New

func New(sessionID, title string) *State

func (*State) Acknowledge

func (s *State) Acknowledge()

func (*State) Apply

func (s *State) Apply(msg tea.Msg, active bool) (changed, bell bool)

Apply updates status on delivery in the TUI event loop.

func (*State) ClearAttention

func (s *State) ClearAttention()

ClearAttention retires prompts even when reloading the same conversation.

func (*State) Consume

func (s *State) Consume() tea.Msg

func (*State) Prepend

func (s *State) Prepend(event tea.Msg)

Prepend restores an already-seen dialog without raising a new attention indicator.

func (*State) ReplaceSession

func (s *State) ReplaceSession(sessionID string)

ReplaceSession retires attention belonging to the previous conversation.

func (*State) RetiresAttention

func (s *State) RetiresAttention(boundary, event tea.Msg) bool

RetiresAttention applies the same boundary policy to parked and open dialogs.

func (*State) SessionID

func (s *State) SessionID() string

SessionID is the live conversation, not the tab's immutable routing key.

func (*State) SetTitle

func (s *State) SetTitle(title string)

func (*State) Snapshot

func (s *State) Snapshot() (title string, running, needsAttention bool)

Snapshot returns one consistent set of tab-bar properties.

Jump to

Keyboard shortcuts

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