Documentation
¶
Index ¶
Constants ¶
View Source
const ( APP_DIR_NAME = "lazycopilot" STYLES_FILE_NAME = "commit-styles.json" DEFAULT_APP_PATHS = "/.config" )
Variables ¶
View Source
var COMMIT_PROMPT = strings.ReplaceAll( COMMIT_PROMPT_WITH_CUSTOM_TONE, "{{tone}}", "Use a LOT of emojis, be funny, and expressive. Feel free to be profane, but don't be offensive", )
View Source
var COMMIT_PROMPT_WITH_CUSTOM_TONE = wrapBlockCode("diff", "{{diff}}") + "\n\n" + `
Write short commit messages:
- Important: Follow the conventional commit format
- The first line should be a short summary of the changes
- Remember to mention the files that were changed, and what was changed
- Explain the 'why' behind changes
- Use bullet points for multiple changes
- Tone: {{tone}}
- If there are no changes, or the input is blank - then return a blank string
Think carefully before you write your commit message.
The output format should be:
<Summary of changes>
- <changes>
- <changes>
What you write will be passed directly to git commit -m "[message]"
`
View Source
var ClientID = "Iv1.b507a08c87ecfe98"
View Source
var DefaultCommitStyles = []CommitStyle{
{
Name: "normal",
Description: "Standard commit message style",
Prompt: "\n\nWriting style clear, concise, and to the point. Focus on the technical change and why it was made.",
},
{
Name: "funny",
Description: "Funny commit messages",
Prompt: "\n\nWriting style humorous, lighthearted, and potentially self-deprecating. Focus on making the reader smile while still conveying the essence of the change.",
},
{
Name: "wise",
Description: "Wise and inspirational commit messages",
Prompt: "\n\nWriting style wise, inspirational, and potentially poetic. Focus on providing a deeper meaning to the technical change.",
},
{
Name: "trolling",
Description: "Trolling commit messages",
Prompt: "\n\nWriting style playful, slightly provocative, and potentially sarcastic. Focus on A bit of a jab, but still conveys the technical change.",
},
}
Functions ¶
func GetCommitStylesConfigPath ¶ added in v1.1.0
func GetCommitStylesConfigPath() string
func SaveCommitStyles ¶ added in v1.1.0
func SaveCommitStyles(styles []CommitStyle) error
Types ¶
type CommitStyle ¶ added in v1.1.0
type CommitStyle struct {
Name string `json:"name"`
Description string `json:"description"`
Prompt string `json:"prompt"`
}
func LoadCommitStyles ¶ added in v1.1.0
func LoadCommitStyles() []CommitStyle
Click to show internal directories.
Click to hide internal directories.