ui

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = KeyMap{
	SelectPrevMessage: key.NewBinding(key.WithKeys("up")),
	SelectNextMessage: key.NewBinding(key.WithKeys("down")),
	UnfocusMessage:    key.NewBinding(key.WithKeys("esc", "ctrl+g")),
	FocusMessage:      key.NewBinding(key.WithKeys("enter")),
	SubmitMessage:     key.NewBinding(key.WithKeys("tab")),
	ScrollUp:          key.NewBinding(key.WithKeys("shift+pgup")),
	ScrollDown:        key.NewBinding(key.WithKeys("shift+pgdown")),
	Quit:              key.NewBinding(key.WithKeys("ctrl+c")),
}

Functions

func InitialModel

func InitialModel(manager *context.Manager, step chat.Step) model

func OpenTTY

func OpenTTY() (io.ReadWriteCloser, error)

Types

type BorderColors

type BorderColors struct {
	Unselected string
	Selected   string
	Focused    string
}

type KeyMap

type KeyMap struct {
	SelectPrevMessage key.Binding
	SelectNextMessage key.Binding
	UnfocusMessage    key.Binding
	FocusMessage      key.Binding
	SubmitMessage     key.Binding
	ScrollUp          key.Binding
	ScrollDown        key.Binding
	CancelCompletion  key.Binding

	LoadFromFile key.Binding

	SaveToFile                  key.Binding
	SaveSourceBlocksToFile      key.Binding
	CopyToClipboard             key.Binding
	CopyLastResponseToClipboard key.Binding
	CopySourceBlocksToClipboard key.Binding

	Help key.Binding
	Quit key.Binding
}

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

type Style

type Style struct {
	UnselectedMessage lipgloss.Style
	SelectedMessage   lipgloss.Style
	FocusedMessage    lipgloss.Style
}

func DefaultStyles

func DefaultStyles() *Style

Jump to

Keyboard shortcuts

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