chat

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	Error      *errbook.AiError
	Output     string
	GlamOutput string
	// contains filtered or unexported fields
}

func NewChat

func NewChat(input *ui.Input, r *lipgloss.Renderer, cfg *options.Config) (*Chat, error)

func (*Chat) Init

func (c *Chat) Init() tea.Cmd

func (*Chat) Update

func (c *Chat) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Chat) View

func (c *Chat) View() string

type Prompt

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

func NewPrompt

func NewPrompt(mode ui.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() ui.PromptMode

func (*Prompt) GetValue

func (p *Prompt) GetValue() string

func (*Prompt) SetMode

func (p *Prompt) SetMode(mode ui.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 Renderer

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

func NewRenderer

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

func (*Renderer) RenderApiBaseConfigMessage

func (r *Renderer) RenderApiBaseConfigMessage() string

func (*Renderer) RenderApiTokenConfigMessage

func (r *Renderer) RenderApiTokenConfigMessage() string

func (*Renderer) RenderConfigMessage

func (r *Renderer) RenderConfigMessage(username string) 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

Jump to

Keyboard shortcuts

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