chat

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 6 Imported by: 0

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

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) Attach

func (i *Input) Attach(path string) error

func (*Input) AttachBytes

func (i *Input) AttachBytes(data []byte, name string) error

func (*Input) Attachments

func (i *Input) Attachments() []*attachments.Attachment

func (*Input) Blur

func (i *Input) Blur()

func (*Input) Clear

func (i *Input) Clear()

func (*Input) Focus

func (i *Input) Focus() tea.Cmd

func (*Input) HandleSlashCommand

func (i *Input) HandleSlashCommand(line string) (handled bool, err error)

func (*Input) Init

func (i *Input) Init() tea.Cmd

func (*Input) RawValue

func (i *Input) RawValue() string

func (*Input) RenderStatus

func (i *Input) RenderStatus() string

func (*Input) SetSize

func (i *Input) SetSize(w, h int)

func (*Input) Update

func (i *Input) Update(msg tea.Msg) (tea.Cmd, *SubmitMsg)

func (*Input) Value

func (i *Input) Value() string

func (*Input) View

func (i *Input) View() string

type SubmitMsg

type SubmitMsg struct {
	Text        string
	Attachments []*attachments.Attachment
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL