Documentation
¶
Overview ¶
Package interact is the contract between the core and its frontends. A new frontend implements UI and needs no change in the core.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupported = errors.New("interaction not supported by this frontend")
ErrUnsupported is returned by a headless UI that cannot ask questions.
View Source
var Modes = []Mode{ModeStrict, ModeBalanced, ModeAcceptEdits, ModeTrust}
Modes is in Shift+Tab and ACP order.
Functions ¶
This section is empty.
Types ¶
type Approval ¶
type Approval struct {
// ToolID is empty when the request is not for a tool call, e.g. a hook
// command.
ToolID string
Tool string
Summary string
Reason string
// Warning describes what a destructive command would do; frontends show
// it prominently.
Warning string
OutsideRoots bool
// Confirm means no mode or stored approval can ever allow this call, so
// it is asked every time.
Confirm bool
// Remember describes what AllowAlways allows from now on, e.g. "`go
// test` commands in this project". Empty means only AllowOnce applies.
Remember string
// Edit means the call edits files, which accept-edits mode allows
// without asking.
Edit bool
}
type Question ¶
type Question struct {
Question string `json:"question"`
Header string `json:"header"`
Options []Option `json:"options"`
MultiSelect bool `json:"multiSelect,omitempty"`
// Custom offers a free-text answer below the options; nil means true.
Custom *bool `json:"custom,omitempty"`
}
func (Question) AllowsCustom ¶
Click to show internal directories.
Click to hide internal directories.