tdmonitor

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tdmonitor embeds the td task manager monitor TUI as a sidecar plugin, providing task/issue tracking with kanban boards and setup flows.

Embedding & Theme Contract:

The embedded td monitor model receives Sidecar's resolved palette as a host-neutral monitor.Theme at construction (via monitor.EmbeddedOptions.Theme) and dynamically at runtime via model.SetTheme(buildTheme()).

When themes change in Sidecar (preview movement, cancellation restore, confirmation, project switching, or Configuration changes), the host delivers msg.ThemeChangedMsg to all plugins. The tdmonitor plugin consumes this message and updates the running monitor's theme in place without resetting navigation, selection, modal, form, or polling state.

Outer gradient chrome continues to be provided via styles.CreateTDPanelRenderer and styles.CreateTDModalRenderer closures, which derive special and depth gradient stops dynamically from the active theme's semantic colors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StallionTick

func StallionTick() tea.Cmd

StallionTick returns a command that ticks for animation.

Types

type MonitorReadyMsg added in v0.87.0

type MonitorReadyMsg struct {
	Epoch uint64
	Model *monitor.Model
	Err   error
}

MonitorReadyMsg carries the embedded td monitor once it has been built.

func (MonitorReadyMsg) GetEpoch added in v0.87.0

func (m MonitorReadyMsg) GetEpoch() uint64

GetEpoch implements plugin.EpochMessage.

type NotInstalledModel

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

NotInstalledModel handles the animated "td not installed" view.

func NewNotInstalledModel

func NewNotInstalledModel() *NotInstalledModel

NewNotInstalledModel creates a new not-installed view model.

func NewNotInstalledModelWithEnv added in v1.3.0

func NewNotInstalledModelWithEnv(env *version.Environment) *NotInstalledModel

NewNotInstalledModelWithEnv creates the view against a described machine so tests never invoke a real package manager.

func (*NotInstalledModel) Init

func (m *NotInstalledModel) Init() tea.Cmd

Init returns the initial command (starts animation).

func (*NotInstalledModel) Update

func (m *NotInstalledModel) Update(msg tea.Msg) tea.Cmd

Update handles messages for the not-installed view.

func (*NotInstalledModel) View

func (m *NotInstalledModel) View(width, height int) string

View renders the complete not-installed screen.

type Plugin

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

Plugin wraps td's monitor TUI as a sidecar plugin. This provides full feature parity with the standalone `td monitor` command.

func New

func New() *Plugin

New creates a new TD Monitor plugin.

func (*Plugin) BlocksGlobalKeys added in v0.96.0

func (p *Plugin) BlocksGlobalKeys() bool

BlocksGlobalKeys reports whether TD's generic modal owns the keyboard.

func (*Plugin) Commands

func (p *Plugin) Commands() []plugin.Command

Commands returns the available commands by consuming TD's exported command metadata.

func (*Plugin) ConsumesTextInput

func (p *Plugin) ConsumesTextInput() bool

ConsumesTextInput reports whether TD monitor is in a text-entry context.

func (*Plugin) ContentLinkSurfaces added in v1.2.0

func (p *Plugin) ContentLinkSurfaces() []contentlink.Surface

ContentLinkSurfaces stays empty until td exports exact passive text rectangles. Its current panel bounds contain actionable rows and controls; scanning them would turn mutation targets into content links.

func (*Plugin) Diagnostics

func (p *Plugin) Diagnostics() []plugin.Diagnostic

Diagnostics returns plugin health info.

func (*Plugin) FocusContext

func (p *Plugin) FocusContext() string

FocusContext returns the current focus context by consuming TD's context state.

func (*Plugin) ID

func (p *Plugin) ID() string

ID returns the plugin identifier.

func (*Plugin) Icon

func (p *Plugin) Icon() string

Icon returns the plugin icon character.

func (*Plugin) Init

func (p *Plugin) Init(ctx *plugin.Context) error

Init initializes the plugin with context.

func (*Plugin) IsFocused

func (p *Plugin) IsFocused() bool

IsFocused returns whether the plugin is focused.

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns the plugin display name.

func (*Plugin) PaneFocus added in v1.2.0

func (p *Plugin) PaneFocus() string

func (*Plugin) PaneFocusStops added in v1.2.0

func (p *Plugin) PaneFocusStops() []plugin.PaneFocusStop

PaneFocusStops projects td's currently rendered root panels into the app focus ring. Inputs, overlays, and replacement views retain Tab by exposing no outer stops.

func (*Plugin) SetFocused

func (p *Plugin) SetFocused(f bool)

SetFocused sets the focus state.

func (*Plugin) SetInstallEnvironment added in v1.3.0

func (p *Plugin) SetInstallEnvironment(env *version.Environment)

SetInstallEnvironment substitutes the process environment first-install runs through. Tests use this so they never invoke a real package manager.

func (*Plugin) SetPaneFocus added in v1.2.0

func (p *Plugin) SetPaneFocus(id string) tea.Cmd

SetPaneFocus uses td's direct setter so cursor clamping and scroll normalization remain owned by the embedded model. No Tab is replayed.

func (*Plugin) SetPaneFocusActive added in v1.2.0

func (p *Plugin) SetPaneFocusActive(active bool)

SetPaneFocusActive mutes only td's selected-panel border while an outer leaf owns focus. The selected panel, cursor, scroll, and rows remain untouched.

func (*Plugin) Start

func (p *Plugin) Start() tea.Cmd

Start begins plugin operation.

func (*Plugin) Stop

func (p *Plugin) Stop()

Stop cleans up plugin resources.

func (*Plugin) Update

func (p *Plugin) Update(msg tea.Msg) (plugin.Plugin, tea.Cmd)

Update handles messages by delegating to the embedded monitor.

func (*Plugin) View

func (p *Plugin) View(width, height int) string

View renders the plugin by delegating to the embedded monitor.

type RGB

type RGB struct {
	R, G, B float64
}

RGB represents a color in RGB space for interpolation.

type SetupModel

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

SetupModel handles the setup modal when td is on PATH but not initialized in project.

func NewSetupModel

func NewSetupModel(baseDir string, epoch uint64) *SetupModel

NewSetupModel creates a new setup modal model.

func (*SetupModel) Init

func (m *SetupModel) Init() tea.Cmd

Init returns the initial command.

func (*SetupModel) Update

func (m *SetupModel) Update(msg tea.Msg) tea.Cmd

Update handles messages for the setup modal.

func (*SetupModel) View

func (m *SetupModel) View(width, height int) string

View renders the setup modal.

type SetupSkippedMsg

type SetupSkippedMsg struct{}

SetupSkippedMsg is sent when user skips setup.

type StallionTickMsg

type StallionTickMsg time.Time

StallionTickMsg is sent to update the animation frame.

Jump to

Keyboard shortcuts

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