Documentation
¶
Index ¶
- Variables
- type ChatMessage
- type CommandResult
- type CommandType
- type InputBuffer
- func (b *InputBuffer) Backspace()
- func (b *InputBuffer) Clear()
- func (b *InputBuffer) CursorIsAtBottom() bool
- func (b *InputBuffer) CursorIsAtTop() bool
- func (b *InputBuffer) CursorPos() (int, int)
- func (b *InputBuffer) Delete()
- func (b *InputBuffer) InsertChar(ch string)
- func (b *InputBuffer) InsertNewline()
- func (b *InputBuffer) InsertPaste(text string)
- func (b *InputBuffer) IsEmpty() bool
- func (b *InputBuffer) LineCount() int
- func (b *InputBuffer) MoveDown() bool
- func (b *InputBuffer) MoveEnd()
- func (b *InputBuffer) MoveHome()
- func (b *InputBuffer) MoveLeft()
- func (b *InputBuffer) MoveRight()
- func (b *InputBuffer) MoveUp() bool
- func (b *InputBuffer) ScrollOffset() int
- func (b *InputBuffer) SetText(text string)
- func (b *InputBuffer) Text() string
- func (b *InputBuffer) VisibleLines(maxHeight int) []string
- type Model
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Title style for the header TitleStyle = lipgloss.NewStyle(). Foreground(colorPrimary). Bold(true). MarginBottom(1) // StatusBar style at the bottom StatusBarStyle = lipgloss.NewStyle(). Foreground(colorText). Background(colorPrimary). Padding(0, 1) // UserMessage style for user chat bubbles UserMessageStyle = lipgloss.NewStyle(). Foreground(colorAccent). Bold(true) // AssistantMessage style for assistant chat AssistantMessageStyle = lipgloss.NewStyle(). Foreground(colorText) // ToolMessage style for tool execution ToolMessageStyle = lipgloss.NewStyle(). Foreground(colorSecondary). Italic(true) // ErrorMessage style ErrorMessageStyle = lipgloss.NewStyle(). Foreground(colorError). Bold(true) // InputPrompt style InputPromptStyle = lipgloss.NewStyle(). Foreground(colorPrimary). Bold(true) // DimStyle for less important text DimStyle = lipgloss.NewStyle(). Foreground(colorDim) // HelpStyle for keybinding hints HelpStyle = lipgloss.NewStyle(). Foreground(colorSecondary) // SelectedStyle for list selections SelectedStyle = lipgloss.NewStyle(). Foreground(colorPrimary). Bold(true) // BorderStyle for panels BorderStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(colorPrimary) )
Styles
Functions ¶
This section is empty.
Types ¶
type ChatMessage ¶
type CommandResult ¶
type CommandResult struct {
Handled bool
Command CommandType
Message string
IsError bool
NewModel string
NewProvider string
ClearChat bool
}
func ExecuteSlashCommand ¶
func ExecuteSlashCommand(input string, cfg *config.Config) CommandResult
type CommandType ¶
type CommandType string
const ( CommandModel CommandType = "model" CommandProvider CommandType = "provider" CommandHelp CommandType = "help" CommandClear CommandType = "clear" CommandUnknown CommandType = "unknown" )
func ParseSlashCommand ¶
func ParseSlashCommand(input string) (CommandType, string, bool)
type InputBuffer ¶
type InputBuffer struct {
// contains filtered or unexported fields
}
func (*InputBuffer) Backspace ¶
func (b *InputBuffer) Backspace()
func (*InputBuffer) Clear ¶
func (b *InputBuffer) Clear()
func (*InputBuffer) CursorIsAtBottom ¶
func (b *InputBuffer) CursorIsAtBottom() bool
func (*InputBuffer) CursorIsAtTop ¶
func (b *InputBuffer) CursorIsAtTop() bool
func (*InputBuffer) CursorPos ¶
func (b *InputBuffer) CursorPos() (int, int)
func (*InputBuffer) Delete ¶
func (b *InputBuffer) Delete()
func (*InputBuffer) InsertChar ¶
func (b *InputBuffer) InsertChar(ch string)
func (*InputBuffer) InsertNewline ¶
func (b *InputBuffer) InsertNewline()
func (*InputBuffer) InsertPaste ¶
func (b *InputBuffer) InsertPaste(text string)
func (*InputBuffer) IsEmpty ¶
func (b *InputBuffer) IsEmpty() bool
func (*InputBuffer) LineCount ¶
func (b *InputBuffer) LineCount() int
func (*InputBuffer) MoveDown ¶
func (b *InputBuffer) MoveDown() bool
func (*InputBuffer) MoveEnd ¶
func (b *InputBuffer) MoveEnd()
func (*InputBuffer) MoveHome ¶
func (b *InputBuffer) MoveHome()
func (*InputBuffer) MoveLeft ¶
func (b *InputBuffer) MoveLeft()
func (*InputBuffer) MoveRight ¶
func (b *InputBuffer) MoveRight()
func (*InputBuffer) MoveUp ¶
func (b *InputBuffer) MoveUp() bool
func (*InputBuffer) ScrollOffset ¶
func (b *InputBuffer) ScrollOffset() int
func (*InputBuffer) SetText ¶
func (b *InputBuffer) SetText(text string)
func (*InputBuffer) Text ¶
func (b *InputBuffer) Text() string
func (*InputBuffer) VisibleLines ¶
func (b *InputBuffer) VisibleLines(maxHeight int) []string
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func NewModel ¶
func NewModel( cfg *config.Config, agentClient *llm.Client, store session.SessionStore, registry tool.ToolRegistry, perm *permission.Service, bus event.EventBus, skillRegistry skill.SkillRegistry, toolsEnabled bool, sessionID string, ) *Model
func (*Model) SetProgram ¶
Click to show internal directories.
Click to hide internal directories.