ui

package
v0.0.0-...-5fbe0f3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompt

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

func NewPrompt

func NewPrompt(mode PromptMode) *Prompt

func (*Prompt) AsString

func (p *Prompt) AsString() string

func (*Prompt) Blur

func (p *Prompt) Blur() *Prompt

func (*Prompt) Focus

func (p *Prompt) Focus() *Prompt

func (*Prompt) GetMode

func (p *Prompt) GetMode() PromptMode

func (*Prompt) GetValue

func (p *Prompt) GetValue() string

func (*Prompt) SetMode

func (p *Prompt) SetMode(mode PromptMode) *Prompt

func (*Prompt) SetValue

func (p *Prompt) SetValue(value string) *Prompt

func (*Prompt) Update

func (p *Prompt) Update(msg tea.Msg) (*Prompt, tea.Cmd)

func (*Prompt) View

func (p *Prompt) View() string

type PromptMode

type PromptMode int
const (
	ExecPromptMode PromptMode = iota
	ConfigPromptMode
	ChatPromptMode
	DefaultPromptMode
)

func GetPromptModeFromString

func GetPromptModeFromString(s string) PromptMode

func (PromptMode) String

func (m PromptMode) String() string

type Renderer

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

func NewRenderer

func NewRenderer(options ...glamour.TermRendererOption) *Renderer

func (*Renderer) RenderConfigMessage

func (r *Renderer) RenderConfigMessage() string

func (*Renderer) RenderContent

func (r *Renderer) RenderContent(in string) string

func (*Renderer) RenderError

func (r *Renderer) RenderError(in string) string

func (*Renderer) RenderHelp

func (r *Renderer) RenderHelp(in string) string

func (*Renderer) RenderHelpMessage

func (r *Renderer) RenderHelpMessage() string

func (*Renderer) RenderSuccess

func (r *Renderer) RenderSuccess(in string) string

func (*Renderer) RenderWarning

func (r *Renderer) RenderWarning(in 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 Ui

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

func NewUi

func NewUi(input *UiInput) *Ui

func (*Ui) Init

func (u *Ui) Init() tea.Cmd

func (*Ui) Update

func (u *Ui) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Ui) View

func (u *Ui) View() string

type UiComponents

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

type UiDimensions

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

type UiInput

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

func NewUIInput

func NewUIInput() (*UiInput, error)

func (*UiInput) GetArgs

func (i *UiInput) GetArgs() string

func (*UiInput) GetPipe

func (i *UiInput) GetPipe() string

func (*UiInput) GetPromptMode

func (i *UiInput) GetPromptMode() PromptMode

func (*UiInput) GetRunMode

func (i *UiInput) GetRunMode() RunMode

type UiState

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

Jump to

Keyboard shortcuts

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