deps

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package deps is what the pages of the dev UI share: the workspace they show and change.

Index

Constants

View Source
const Settle = 250 * time.Millisecond

Settle is how long Follow waits after a change before it updates, so that a burst of changes makes one update.

Variables

This section is empty.

Functions

func Follow

func Follow(ctx context.Context, b Backend, update func(context.Context)) error

Follow calls update at once, and again after every change of b, until ctx is done; it then returns nil. A page's Subscribe returns what it returns.

func LocalTime

func LocalTime(t, now time.Time) string

LocalTime returns t in local time as the pages show it: the time of day, after the date when t falls on another day than now.

Types

type Backend

type Backend interface {
	devapi.Backend
	// Stop stops app until Start; it returns at once.
	Stop(app string) error
	// Start starts app, or restarts it when it runs; it returns at once.
	Start(app string) error
	// SetManual switches app into manual mode, or out of it; it returns at once.
	SetManual(app string, on bool) error
	// Personas returns the personas the gateway offers.
	Personas() []devconfig.Persona
	// Changed returns a channel that is closed at the next change of the workspace.
	Changed() <-chan struct{}
}

Backend is the workspace the dev UI shows and changes.

type Deps

type Deps struct {
	Backend Backend
	// Executable is the absolute path of this aicoded, for the MCP setup commands.
	Executable string
}

Deps is passed to every page's data provider.

func New

func New(b Backend, executable string) *Deps

New returns the Deps of the pages.

Jump to

Keyboard shortcuts

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