Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxContextOutputBytes = 200000 RecentCommitMessageCount = 15 )
Variables ¶
This section is empty.
Functions ¶
func HasStagedFiles ¶
Types ¶
type CommandOutput ¶
type CommandOutput struct {
ID string `json:"id"`
Command []string `json:"command"`
Description string `json:"description"`
Required bool `json:"required"`
Output string `json:"output"`
Stderr string `json:"stderr"`
ExitCode int `json:"exit_code"`
Truncated bool `json:"truncated"`
Truncation *Truncation `json:"truncation,omitempty"`
}
type CommitMessageContext ¶
type CommitMessageContext struct {
FormatVersion string `json:"format_version"`
StagedChanges ContextSection `json:"staged_changes"`
StyleContext ContextSection `json:"style_context"`
}
func CollectCommitMessageContext ¶
func CollectCommitMessageContext(ctx context.Context) (CommitMessageContext, error)
func (CommitMessageContext) Marshal ¶
func (c CommitMessageContext) Marshal() (string, error)
type ContextSection ¶
type ContextSection struct {
Outputs []CommandOutput `json:"outputs"`
}
Click to show internal directories.
Click to hide internal directories.