Documentation
¶
Overview ¶
Package chatinput renders a single-line chat prompt with a placeholder, cursor, and submit/escape key bindings. It's a thin Bubble Tea model — the consumer owns the code and is expected to extend it (history, multi-line, slash commands, completions) by editing the file directly.
Index ¶
- type CancelMsg
- type Input
- func (i Input) Blur() Input
- func (i Input) Focus() Input
- func (i Input) Focused() bool
- func (i Input) Init() tea.Cmd
- func (i Input) Reset() Input
- func (i Input) Update(msg tea.Msg) (Input, tea.Cmd)
- func (i Input) Value() string
- func (i Input) View() string
- func (i Input) WithPlaceholder(s string) Input
- func (i Input) WithPrompt(s string) Input
- func (i Input) WithValue(s string) Input
- func (i Input) WithWidth(w int) Input
- type SubmitMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
Input is a Bubble Tea model for a chat-style single-line text input.
func (Input) WithPlaceholder ¶
WithPlaceholder sets the placeholder shown when the value is empty.
func (Input) WithPrompt ¶
WithPrompt sets the prompt prefix (default "> "). Use "" for no prompt.
Click to show internal directories.
Click to hide internal directories.
