watch

package
v0.7.196 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package watch implements the chunk watch TUI dashboard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model is the BubbleTea model for the watch dashboard.

func New

func New(projects []ProjectEntry, watchAll bool) Model

New creates a Model ready to run. When watchAll is true (the default for `chunk watch`; `--focus` turns it off), each poll also checks for projects that have saved a sidecar since the dashboard started and adds them, so a sidecar started after the dashboard launches still shows up without a restart.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() tea.View

func (Model) WithConnection added in v0.7.196

func (m Model) WithConnection(conn watchd.Connection) Model

WithConnection returns a copy of m that reports conn as the daemon it talks to. New reads it from the environment; this is for callers and tests that already know.

func (Model) WithDaemonArgs

func (m Model) WithDaemonArgs(subArgs []string) Model

WithDaemonArgs returns a copy of m that can relaunch the watch daemon when a poll finds it gone. subArgs is the argv the daemon is started with, the same one passed to watchd.EnsureRunning.

type ProjectEntry

type ProjectEntry struct {
	Log         *eventlog.Log
	DataDir     string
	ProjectRoot string
}

ProjectEntry holds everything the watch model needs for one project.

Jump to

Keyboard shortcuts

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