Documentation
¶
Index ¶
- type App
- type AppPhase
- type Editor
- func (e *Editor) AddHistory(entry string)
- func (e *Editor) HandleKey(ev inline.KeyEvent) bool
- func (e *Editor) HistoryNext() bool
- func (e *Editor) HistoryPrev() bool
- func (e *Editor) Insert(text string)
- func (e *Editor) Render(width, maxRows int) ([]string, inline.Pos)
- func (e *Editor) ReplaceRange(from, to int, text string)
- func (e *Editor) ResetHistoryCursor()
- func (e *Editor) SetPlaceholder(p string)
- func (e *Editor) SetRuleColor(c ansi.Color)
- func (e *Editor) SetText(text string)
- func (e *Editor) Text() string
- type Mode
- type Overlay
- type Popup
- type PopupItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) Elicit ¶ added in v0.10.1
func (a *App) Elicit(ctx context.Context, req tool.ElicitRequest) (tool.ElicitResult, error)
func (*App) SetSessionID ¶
func (*App) WithTerminal ¶ added in v0.11.0
WithTerminal replaces the terminal, used by tests.
type Editor ¶ added in v0.11.0
type Editor struct {
// contains filtered or unexported fields
}
Editor is a multiline input bounded by horizontal rules. The rule color is a status channel (mode, activity) set by the app.
func (*Editor) AddHistory ¶ added in v0.11.0
func (*Editor) HandleKey ¶ added in v0.11.0
HandleKey processes an input event. It reports whether the event was consumed; unconsumed navigation (history recall) is handled by the caller.
func (*Editor) HistoryNext ¶ added in v0.11.0
func (*Editor) HistoryPrev ¶ added in v0.11.0
func (*Editor) Render ¶ added in v0.11.0
Render returns the editor lines (rules included) and the cursor position relative to the returned block.
func (*Editor) ReplaceRange ¶ added in v0.11.7
ReplaceRange substitutes the rune range [from, to) with text and leaves the cursor after the inserted text.
func (*Editor) ResetHistoryCursor ¶ added in v0.11.0
func (e *Editor) ResetHistoryCursor()
func (*Editor) SetPlaceholder ¶ added in v0.11.0
func (*Editor) SetRuleColor ¶ added in v0.11.0
type Overlay ¶ added in v0.11.0
Overlay is a full-screen view replacing the chat frame. HandleKey returns true when the overlay should close.
type Popup ¶ added in v0.11.0
type Popup struct {
// contains filtered or unexported fields
}
Popup is the single list component behind slash-command completion, file mentions, and the model/effort/rewind pickers. It renders below the composer. Standalone pickers (popupList) capture all input; the other kinds filter as the user types in the editor.
func (*Popup) HandleKey ¶ added in v0.11.0
HandleKey processes navigation. Returns (consumed, closed).