Documentation ¶
Index ¶
- type Components
- type Dimensions
- type History
- type Input
- type Prompt
- func (p *Prompt) AsString() string
- func (p *Prompt) Blur() *Prompt
- func (p *Prompt) Focus() *Prompt
- func (p *Prompt) GetMode() PromptMode
- func (p *Prompt) GetValue() string
- func (p *Prompt) SetMode(mode PromptMode) *Prompt
- func (p *Prompt) SetValue(value string) *Prompt
- func (p *Prompt) Update(msg tea.Msg) (*Prompt, tea.Cmd)
- func (p *Prompt) View() string
- type PromptMode
- type Renderer
- func (r *Renderer) RenderApiBaseConfigMessage() string
- func (r *Renderer) RenderApiTokenConfigMessage() string
- func (r *Renderer) RenderConfigMessage(username string) string
- func (r *Renderer) RenderContent(in string) string
- func (r *Renderer) RenderError(in string) string
- func (r *Renderer) RenderHelp(in string) string
- func (r *Renderer) RenderHelpMessage() string
- func (r *Renderer) RenderSuccess(in string) string
- func (r *Renderer) RenderWarning(in string) string
- type RunMode
- type Spinner
- type State
- type TextareaModel
- type Ui
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct {
// contains filtered or unexported fields
}
type Dimensions ¶
type Dimensions struct {
// contains filtered or unexported fields
}
type History ¶
type History struct {
// contains filtered or unexported fields
}
func NewHistory ¶
func NewHistory() *History
func (*History) GetPrevious ¶
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
func (*Input) GetPromptMode ¶
func (i *Input) GetPromptMode() PromptMode
func (*Input) GetRunMode ¶
type Prompt ¶
type Prompt struct {
// contains filtered or unexported fields
}
func NewPrompt ¶
func NewPrompt(mode PromptMode) *Prompt
func (*Prompt) GetMode ¶
func (p *Prompt) GetMode() PromptMode
func (*Prompt) SetMode ¶
func (p *Prompt) SetMode(mode PromptMode) *Prompt
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 Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer(options ...glamour.TermRendererOption) *Renderer
func (*Renderer) RenderApiBaseConfigMessage ¶
func (*Renderer) RenderApiTokenConfigMessage ¶
func (*Renderer) RenderConfigMessage ¶
func (*Renderer) RenderContent ¶
func (*Renderer) RenderError ¶
func (*Renderer) RenderHelp ¶
func (*Renderer) RenderHelpMessage ¶
func (*Renderer) RenderSuccess ¶
func (*Renderer) RenderWarning ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
func NewSpinner ¶
func NewSpinner() *Spinner
type TextareaModel ¶ added in v0.1.4
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) View ¶ added in v0.1.4
func (m TextareaModel) View() string
Click to show internal directories.
Click to hide internal directories.