Documentation
¶
Overview ¶
SPDX-License-Identifier: MIT Purpose: chat input widget — textarea with attachment support and slash commands. Used by the TUI 2.0 chat mode (Phase 5 of st-3t5v).
Index ¶
- type Input
- func (i *Input) Attach(path string) error
- func (i *Input) AttachBytes(data []byte, name string) error
- func (i *Input) Attachments() []*attachments.Attachment
- func (i *Input) Blur()
- func (i *Input) Clear()
- func (i *Input) Focus() tea.Cmd
- func (i *Input) HandleSlashCommand(line string) (handled bool, err error)
- func (i *Input) Init() tea.Cmd
- func (i *Input) RawValue() string
- func (i *Input) RenderStatus() string
- func (i *Input) SetSize(w, h int)
- func (i *Input) Update(msg tea.Msg) (tea.Cmd, *SubmitMsg)
- func (i *Input) Value() string
- func (i *Input) View() string
- 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
}
func NewInput ¶
func NewInput(store *attachments.Store) *Input
func (*Input) Attachments ¶
func (i *Input) Attachments() []*attachments.Attachment
func (*Input) HandleSlashCommand ¶
func (*Input) RenderStatus ¶
type SubmitMsg ¶
type SubmitMsg struct {
Text string
Attachments []*attachments.Attachment
}
Click to show internal directories.
Click to hide internal directories.