Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeminiQuery ¶
type GeminiQuery struct { *IO // contains filtered or unexported fields }
GeminiQuery processes queries to gemini models. It implements the MessageHandler interface.
func NewGeminiQuery ¶
func NewGeminiQuery(io *IO, session *gemini.ChatSession, opts RendererOptions) (*GeminiQuery, error)
NewGeminiQuery returns a new GeminiQuery message handler.
type HelpCommand ¶
type HelpCommand struct { *IO // contains filtered or unexported fields }
HelpCommand handles the help system command request.
func NewHelpCommand ¶
func NewHelpCommand(io *IO, opts RendererOptions) (*HelpCommand, error)
NewHelpCommand returns a new HelpCommand.
type HistoryCommand ¶
type HistoryCommand struct { *IO // contains filtered or unexported fields }
HistoryCommand processes the chat history system commands. It implements the MessageHandler interface.
func NewHistoryCommand ¶
func NewHistoryCommand(io *IO, session *gemini.ChatSession, configuration *config.Configuration) *HistoryCommand
NewHistoryCommand returns a new HistoryCommand.
type IO ¶
type IO struct {
// contains filtered or unexported fields
}
IO encapsulates terminal details for handlers.
func (*IO) TerminalPrompt ¶
TerminalPrompt returns the terminal prompt string.
type InputModeCommand ¶
type InputModeCommand struct {
*IO
}
InputModeCommand processes the chat input mode system command. It implements the MessageHandler interface.
func NewInputModeCommand ¶
func NewInputModeCommand(io *IO) *InputModeCommand
NewInputModeCommand returns a new InputModeCommand.
type MessageHandler ¶
type MessageHandler interface { // Handle processes the message and returns a response, along with a flag // indicating whether the application should terminate. Handle(message string) (Response, bool) // TerminalPrompt returns the terminal prompt for the handler. TerminalPrompt() string }
MessageHandler handles chat messages from the user.
type ModelCommand ¶
type ModelCommand struct { *IO // contains filtered or unexported fields }
ModelCommand processes the chat model system commands. It implements the MessageHandler interface.
func NewModelCommand ¶
func NewModelCommand(io *IO, session *gemini.ChatSession, modelName string) *ModelCommand
NewModelCommand returns a new ModelCommand.
type QuitCommand ¶
type QuitCommand struct {
*IO
}
QuitCommand processes the chat quit system command. It implements the MessageHandler interface.
func NewQuitCommand ¶
func NewQuitCommand(io *IO) *QuitCommand
NewQuitCommand returns a new QuitCommand.
type RendererOptions ¶
RendererOptions represents configuration options for the terminal renderer.
type SystemCommand ¶
type SystemCommand struct { *IO // contains filtered or unexported fields }
SystemCommand processes chat system commands; implements the MessageHandler interface. It aggregates the processing by delegating it to one of the underlying handlers.
func NewSystemCommand ¶
func NewSystemCommand(io *IO, session *gemini.ChatSession, configuration *config.Configuration, modelName string, rendererOptions RendererOptions) (*SystemCommand, error)
NewSystemCommand returns a new SystemCommand.
type SystemPromptCommand ¶
type SystemPromptCommand struct { *IO // contains filtered or unexported fields }
SystemPromptCommand processes the chat prompt system command. It implements the MessageHandler interface.
func NewSystemPromptCommand ¶
func NewSystemPromptCommand(io *IO, session *gemini.ChatSession, applicationData *config.ApplicationData) *SystemPromptCommand
NewSystemPromptCommand returns a new SystemPromptCommand.