ui

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheDetailsMsg added in v0.1.10

type CacheDetailsMsg struct {
	WriteID string // ID for writing to cache
	Title   string // Title of the cached item
	ReadID  string // ID for reading from cache
	Model   string // Model associated with the cache
}

CacheDetailsMsg contains information about cached data

type PromptMode

type PromptMode int

PromptMode represents different modes of user interaction

const (
	// ExecPromptMode is for executing commands
	ExecPromptMode PromptMode = iota

	// TokenConfigPromptMode is for configuring API tokens
	TokenConfigPromptMode

	// ModelConfigPromptMode is for configuring models
	ModelConfigPromptMode

	// ApiBaseConfigPromptMode is for configuring API base URLs
	ApiBaseConfigPromptMode

	// ChatPromptMode is for chat interactions
	ChatPromptMode

	// DefaultPromptMode is the fallback mode
	DefaultPromptMode
)

func GetPromptModeFromString

func GetPromptModeFromString(s string) PromptMode

GetPromptModeFromString converts a string to its corresponding PromptMode

func (PromptMode) String

func (m PromptMode) String() string

String returns the string representation of a PromptMode

type RunMode

type RunMode int

RunMode represents different runtime modes

const (
	// CliMode is for command-line interface operation
	CliMode RunMode = iota

	// ReplMode is for read-eval-print-loop operation
	ReplMode
)

func (RunMode) String

func (m RunMode) String() string

String returns the string representation of a RunMode

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