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.
Click to show internal directories.
Click to hide internal directories.