changes

package
v0.73.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 13 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 changes implements the REPL's Changes panel: a live view of the working tree's git changes shown beside, or instead of, the conversation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PadBlock

func PadBlock(block string, width, height int) string

Types

type Panel

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

The zero value is a disabled Panel; use New.

func New

func New(workDir string) Panel

New returns a disabled panel until OpenCmd finds a repository.

func (*Panel) Blur

func (p *Panel) Blur()

func (*Panel) Click

func (p *Panel) Click(x, y int) Result

func (*Panel) Contains

func (p *Panel) Contains(x, y int) bool

func (*Panel) Cycle

func (p *Panel) Cycle() Result

Cycle skips split view in narrow terminals.

func (*Panel) Enabled

func (p *Panel) Enabled() bool

func (*Panel) Focus

func (p *Panel) Focus()

Focus requires the host to blur its own input.

func (*Panel) Focused

func (p *Panel) Focused() bool

func (*Panel) FullVisible

func (p *Panel) FullVisible() bool

func (*Panel) HandleKey

func (p *Panel) HandleKey(msg tea.KeyPressMsg) Result

HandleKey lets the host handle unrecognized keys.

func (*Panel) Indicator

func (p *Panel) Indicator() string

func (*Panel) ObserveActivity

func (p *Panel) ObserveActivity(activity agentcore.ToolActivity)

ObserveActivity remembers edit paths from tool-start events because subagent tool-end events omit tool input.

func (*Panel) ObserveToolCall

func (p *Panel) ObserveToolCall(toolCall *agentcore.ToolCall)

ObserveToolCall treats tool inputs only as refresh hints; git provides the data.

func (*Panel) OpenCmd

func (p *Panel) OpenCmd() tea.Cmd

func (*Panel) OutputWidth

func (p *Panel) OutputWidth() int

func (*Panel) RequestFullScan

func (p *Panel) RequestFullScan()

func (*Panel) Separator

func (p *Panel) Separator() string

func (*Panel) SetSize

func (p *Panel) SetSize(width, height int) bool

SetSize updates the panel dimensions and reports a split-layout change.

func (*Panel) SetSuspended

func (p *Panel) SetSuspended(suspended bool)

Full-screen mode must not cover a prompt in the conversation area.

func (*Panel) SetTurnActive

func (p *Panel) SetTurnActive(active bool)

SetTurnActive schedules a full scan after turns that ran bash or MCP tools.

func (*Panel) SplitVisible

func (p *Panel) SplitVisible() bool

func (*Panel) Tick

func (p *Panel) Tick() (tea.Cmd, bool)

Tick starts pending scans and diff loads and reports a split-layout change.

func (*Panel) Update

func (p *Panel) Update(msg tea.Msg) bool

func (*Panel) View

func (p *Panel) View() string

func (*Panel) Visible

func (p *Panel) Visible() bool

func (*Panel) Wheel

func (p *Panel) Wheel(x, y, delta int)

func (*Panel) X

func (p *Panel) X() int

type Result

type Result struct {
	Handled    bool
	Cmd        tea.Cmd
	FocusPanel bool
	FocusInput bool
	Mention    string
	Copy       string
	Notify     string
}

Result tells the host what to do after the panel handled an input.

Jump to

Keyboard shortcuts

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