review

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package review is live mode's suggestions panel (docs/agents/live.md): a box at the right of the grid listing the agents' suggestions waiting for the person, each by agent and message with the cells it would set, to accept or reject whole or cell by cell, with keys or the mouse. The grid beside it shows the cell of the row highlighted. It knows the UI only through Host.

Index

Constants

View Source
const ID = "review"

ID identifies the panel's box in mouse events.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell struct {
	Index    int // in the suggestion
	Sheet    string
	At       sheet.Addr
	Was, Now string
	Look     bool // its format, style or note change too
}

Cell is one cell a suggestion sets.

type Host

type Host interface {
	Theme() *theme.Theme
	Size() (width, height int)
	// Close closes the open overlay.
	Close()
	// Suggestions are those waiting, oldest first.
	Suggestions() []Item
	// Accept and Reject settle the cells of suggestion id picked, by
	// their index in it; nil is all it has waiting.
	Accept(id int, cells []int)
	Reject(id int, cells []int)
	// Reveal puts the pointer on a cell a suggestion sets.
	Reveal(sheet string, at sheet.Addr)
}

Host is what the panel needs of the UI.

type Item

type Item struct {
	ID      int
	Agent   string
	Color   int
	Label   string
	Message string
	Whole   bool     // it can only be accepted whole
	Other   []string // what it does besides setting cells
	Cells   []Cell   // the cells still waiting
	Total   int      // the cells it sets, waiting or not
	Failed  string   // why accepting it failed
}

Item is a suggestion as the panel lists it.

type Panel

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

Panel is the open suggestions panel.

func New

func New(h Host) *Panel

New opens the panel on the first suggestion.

func (*Panel) Indicator

func (p *Panel) Indicator() string

func (*Panel) Key

func (p *Panel) Key(k tea.KeyPressMsg) tea.Cmd

func (*Panel) Layout

func (p *Panel) Layout() []overlay.Box

func (*Panel) Mouse

func (p *Panel) Mouse(e overlay.MouseEvent) tea.Cmd

func (*Panel) Status

func (p *Panel) Status() (string, string)

Jump to

Keyboard shortcuts

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