Documentation ¶
Index ¶
Constants ¶
View Source
const ( CommitChangesOption = "Commit changes to git" RegenerateOption = "Regenerate commit message" CopyToClipboardOption = "Copy message to clipboard" ExitOption = "Exit" )
View Source
const SystemMsg = `` /* 2037-byte string literal not displayed */
SystemMsg is the message that will feed the OpenAI API to generate the commit message.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clipboard ¶
type Clipboard interface { // Copy copies the given message to the clipboard. Copy(message string) error }
Clipboard is an interface that defines the Copy method.
func MakeClipboard ¶
func MakeClipboard() Clipboard
type ClipboardCommand ¶
func MakeClipboardCommand ¶
func MakeClipboardCommand() ClipboardCommand
func NewClipboardCommand ¶
func NewClipboardCommand(clipboard Clipboard) ClipboardCommand
type GeneratorCommand ¶
type GeneratorCommand interface { // Execute returns the commit message generated by OpenAI. Execute(config *openai.Config) (string, error) }
GeneratorCommand is the interface that wraps the Execute method.
func MakeGeneratorCommand ¶
func MakeGeneratorCommand() GeneratorCommand
func NewGeneratorCommand ¶
func NewGeneratorCommand( chatCommand openai.ChatCommand, diffCommand git.DiffCommand, ) GeneratorCommand
NewGeneratorCommand creates a new instance of GeneratorCommand.
type PostCommitCli ¶
PostCommitCli is an interface for executing post commit CLI operations.
func MakePostCommitCli ¶
func MakePostCommitCli() PostCommitCli
func NewPostCommitCli ¶
func NewPostCommitCli() PostCommitCli
NewPostCommitCli creates a new instance of PostCommitCli.
Click to show internal directories.
Click to hide internal directories.