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 ¶
- func StallionTick() tea.Cmd
- type MonitorReadyMsg
- type NotInstalledModel
- type Plugin
- func (p *Plugin) BlocksGlobalKeys() bool
- func (p *Plugin) Commands() []plugin.Command
- func (p *Plugin) ConsumesTextInput() bool
- func (p *Plugin) Diagnostics() []plugin.Diagnostic
- func (p *Plugin) FocusContext() string
- func (p *Plugin) ID() string
- func (p *Plugin) Icon() string
- func (p *Plugin) Init(ctx *plugin.Context) error
- func (p *Plugin) IsFocused() bool
- func (p *Plugin) Name() string
- func (p *Plugin) SetFocused(f bool)
- func (p *Plugin) Start() tea.Cmd
- func (p *Plugin) Stop()
- func (p *Plugin) Update(msg tea.Msg) (plugin.Plugin, tea.Cmd)
- func (p *Plugin) View(width, height int) string
- type RGB
- type SetupCompleteMsg
- type SetupErrorMsg
- type SetupModel
- type SetupSkippedMsg
- type StallionTickMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StallionTick ¶
StallionTick returns a command that ticks for animation.
Types ¶
type MonitorReadyMsg ¶ added in v0.87.0
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 (*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 (*Plugin) BlocksGlobalKeys ¶ added in v0.96.0
BlocksGlobalKeys reports whether TD's generic modal owns the keyboard.
func (*Plugin) Commands ¶
Commands returns the available commands by consuming TD's exported command metadata.
func (*Plugin) ConsumesTextInput ¶
ConsumesTextInput reports whether TD monitor is in a text-entry context.
func (*Plugin) Diagnostics ¶
func (p *Plugin) Diagnostics() []plugin.Diagnostic
Diagnostics returns plugin health info.
func (*Plugin) FocusContext ¶
FocusContext returns the current focus context by consuming TD's context state.
type RGB ¶
type RGB struct {
R, G, B float64
}
RGB represents a color in RGB space for interpolation.
type SetupCompleteMsg ¶
type SetupCompleteMsg struct{}
SetupCompleteMsg is sent when setup completes successfully.
type SetupErrorMsg ¶ added in v0.75.0
type SetupErrorMsg struct {
Error string
}
SetupErrorMsg is sent when setup encounters a blocking error.
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) *SetupModel
NewSetupModel creates a new setup modal model.
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 StallionTickMsg ¶
StallionTickMsg is sent to update the animation frame.