Documentation
¶
Index ¶
Constants ¶
View Source
const ( User = Identity("user") System = Identity("system") )
Variables ¶
View Source
var ErrCloseChat = errors.New("close chat")
Functions ¶
This section is empty.
Types ¶
type ChatBackend ¶
type ChatBackend interface {
HandleInput(ctx context.Context, in string, out chan<- *Message) error
}
HandleInputFunc should process `in`, closing `out` once all processing has completed. The input handler is responsible for echoing the input into `out` if desired. If the handler decides the chat UI should be closed, the handler should return ErrCloseChat The chatbox will notify the handler of any cancellation via the ctx.
type ChatBox ¶
type ChatBox struct {
// contains filtered or unexported fields
}
func NewChatbox ¶
func NewChatbox(app *tview.Application, handler ChatBackend, opts ChatBoxOpts) *ChatBox
func (*ChatBox) Widget ¶
func (cb *ChatBox) Widget() modal.InputCaptureable
type ChatBoxOpts ¶
Click to show internal directories.
Click to hide internal directories.