ui

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnim added in v0.1.10

func NewAnim(cyclingCharsSize uint, label string, r *lipgloss.Renderer, s display.Styles) anim

Types

type CacheDetailsMsg added in v0.1.10

type CacheDetailsMsg struct {
	WriteID, Title, ReadID, Model string
}

type History

type History struct {
	// contains filtered or unexported fields
}

func NewHistory

func NewHistory() *History

func (*History) Add

func (h *History) Add(input string) *History

func (*History) GetAll

func (h *History) GetAll() map[int]string

func (*History) GetCursor

func (h *History) GetCursor() int

func (*History) GetNext

func (h *History) GetNext() *string

func (*History) GetPrevious

func (h *History) GetPrevious() *string

func (*History) Reset

func (h *History) Reset() *History

type Input

type Input struct {
	// contains filtered or unexported fields
}

func NewInput

func NewInput(runMode RunMode, promptMode PromptMode, pipe string, prompts []string) (*Input, error)

func (*Input) GetArgs

func (i *Input) GetArgs() string

func (*Input) GetPipe

func (i *Input) GetPipe() string

func (*Input) GetPromptMode

func (i *Input) GetPromptMode() PromptMode

func (*Input) GetRunMode

func (i *Input) GetRunMode() RunMode

type PromptMode

type PromptMode int
const (
	ExecPromptMode PromptMode = iota
	TokenConfigPromptMode
	ModelConfigPromptMode
	ApiBaseConfigPromptMode
	ChatPromptMode
	DefaultPromptMode
)

func GetPromptModeFromString

func GetPromptModeFromString(s string) PromptMode

func (PromptMode) String

func (m PromptMode) String() string

type RunMode

type RunMode int
const (
	CliMode RunMode = iota
	ReplMode
)

func (RunMode) String

func (m RunMode) String() string

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

func NewSpinner

func NewSpinner() *Spinner

func (*Spinner) Tick

func (s *Spinner) Tick() tea.Msg

func (*Spinner) Update

func (s *Spinner) Update(msg tea.Msg) (*Spinner, tea.Cmd)

func (*Spinner) View

func (s *Spinner) View() string

type TextareaModel added in v0.1.4

type TextareaModel struct {
	Textarea textarea.Model
	Err      error
}

func InitialTextareaPrompt added in v0.1.4

func InitialTextareaPrompt(value string) TextareaModel

func (TextareaModel) Init added in v0.1.4

func (m TextareaModel) Init() tea.Cmd

func (TextareaModel) Update added in v0.1.4

func (m TextareaModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (TextareaModel) View added in v0.1.4

func (m TextareaModel) View() string

Directories

Path Synopsis
Package coders provides interfaces and types for working with code editors.
Package coders provides interfaces and types for working with code editors.

Jump to

Keyboard shortcuts

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