Documentation ¶
Index ¶
- Variables
- func CenterString(str string, width int, color lipgloss.Color) string
- func DecodeGob(r io.Reader, messages *[]ChatMessage) error
- func EncodeGob(w io.Writer, messages *[]ChatMessage) error
- func GenerateChatID() string
- func NewChatSettingsForm() (client.Chat, error)
- type Chat
- type ChatMessage
- type ContentType
- type CopyType
- type FinishedStreaming
- type KeyMap
- type StreamChunk
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var DisabledHighlightStyle = lipgloss.NewStyle(). Foreground(gray). Bold(true)
View Source
var HighlightActiveStyle = lipgloss.NewStyle(). Background(teal). Foreground(black). Bold(true). Padding(0, 1)
View Source
var HighlightForegroundStyle = lipgloss.NewStyle(). Foreground(purple). Bold(true)
View Source
var HighlightStyle = lipgloss.NewStyle(). Background(purple). Bold(true). Padding(0, 1)
View Source
var Keys = KeyMap{ Up: key.NewBinding( key.WithKeys("ctrl+up", "k"), key.WithHelp("ctrl+↑", "Move view up"), ), Down: key.NewBinding( key.WithKeys("ctrl+down", "j"), key.WithHelp("ctrl+↓", "Move view down"), ), HalfPageUp: key.NewBinding( key.WithKeys("ctrl+u"), key.WithHelp("ctrl+u", "Half page up"), ), HalfPageDown: key.NewBinding( key.WithKeys("ctrl+d"), key.WithHelp("ctrl+d", "Half page down"), ), HighlightPreviousMessage: key.NewBinding( key.WithKeys("ctrl+p"), key.WithHelp("ctrl+p", "Previous message"), ), HighlightNextMessage: key.NewBinding( key.WithKeys("ctrl+n"), key.WithHelp("ctrl+n", "Next message"), ), CopyLastResponse: key.NewBinding( key.WithKeys("ctrl+y"), key.WithHelp("ctrl+y", "Copy last response"), ), CopyHighlightedMessage: key.NewBinding( key.WithKeys("alt+y"), key.WithHelp("alt+y", "Copy highlighted message"), ), ToggleImagePicker: key.NewBinding( key.WithKeys("ctrl+o"), key.WithHelp("ctrl+o", "Toggle image picker"), ), RemoveAttachment: key.NewBinding( key.WithKeys("ctrl+x"), key.WithHelp("ctrl+x", "Remove attachment"), ), ToggleHelp: key.NewBinding( key.WithKeys("ctrl+h"), key.WithHelp("ctrl+h", "Toggle help"), ), Quit: key.NewBinding( key.WithKeys("ctrl+c"), key.WithHelp("ctrl+c", "Exit chat"), ), }
View Source
var NotificationStyle = lipgloss.NewStyle(). Background(notif). Foreground(black). Bold(true). Padding(0, 1)
View Source
var RoundedBorder = lipgloss.NewStyle(). BorderStyle(lipgloss.RoundedBorder())
Functions ¶
func GenerateChatID ¶
func GenerateChatID() string
func NewChatSettingsForm ¶
Types ¶
type Chat ¶
type Chat struct { Glamour *glamour.TermRenderer ChatHistory []ChatMessage ChatSettings client.Chat // contains filtered or unexported fields }
func (*Chat) CopyToClipboard ¶ added in v0.1.11
func (*Chat) ImagePickerView ¶
type ChatMessage ¶
type ContentType ¶
type ContentType string
type FinishedStreaming ¶
type FinishedStreaming bool
type KeyMap ¶ added in v0.1.11
type KeyMap struct { Up key.Binding // ctrl+up Down key.Binding // ctrl+down HalfPageUp key.Binding // ctrl+u HalfPageDown key.Binding // ctrl+d HighlightPreviousMessage key.Binding // ctrl+p HighlightNextMessage key.Binding // ctrl+n CopyHighlightedMessage key.Binding // alt+c CopyLastResponse key.Binding // ctrl+shift+c ToggleImagePicker key.Binding // ctrl+o RemoveAttachment key.Binding // ctrl+x ToggleHelp key.Binding // ctrl+h Quit key.Binding // ctrl+c FullHelpKeys [][]key.Binding }
func (*KeyMap) DefaultFullHelpKeys ¶ added in v0.1.11
func (KeyMap) FullHelp ¶ added in v0.1.11
FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.
func (*KeyMap) SetFullHelpKeys ¶ added in v0.1.11
type StreamChunk ¶
type StreamChunk string
Click to show internal directories.
Click to hide internal directories.