context

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ sdk.Service) sdk.Plugin

New creates a new context plugin.

Types

type Plugin

type Plugin struct {
	sdk.PluginBase
	// contains filtered or unexported fields
}

Plugin implements the context dashboard — shows Project, Chdir, Workspace.

func (*Plugin) Activate

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

Activate builds the form frame and pushes it onto the stack.

func (*Plugin) Configure

func (p *Plugin) Configure(opts map[string]interface{}) error

Configure applies plugin-specific options from config.

func (*Plugin) HandleContextChanged added in v1.10.0

func (p *Plugin) HandleContextChanged(ev sdk.ContextChangedEvent) tea.Cmd

HandleContextChanged implements sdk.ContextChangedHandler. The context plugin mirrors the active chdir + workspace so its form reflects the current state.

func (*Plugin) Init

func (p *Plugin) Init(deps *sdk.PluginDeps) tea.Cmd

Init wires the plugin to its shared dependencies. The boot-time workspace is read from deps.Context(); subsequent changes arrive via ContextChangedEvent.

func (*Plugin) Ready

func (p *Plugin) Ready() bool

func (*Plugin) SetMembers added in v1.5.0

func (p *Plugin) SetMembers(members []string)

SetMembers provides the list of chdir members.

func (*Plugin) SetProjectDir added in v1.5.0

func (p *Plugin) SetProjectDir(dir string)

SetProjectDir sets the project directory for display.

func (*Plugin) Stack

func (p *Plugin) Stack() *sdk.Stack

func (*Plugin) Update

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

Update processes messages and returns the updated plugin.

func (*Plugin) View

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

View renders via the stack.

Jump to

Keyboard shortcuts

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