prompt

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCodeReviewPromptTemplate = `` /* 576-byte string literal not displayed */

DefaultCodeReviewPromptTemplate is used for code review prompts.

View Source
const DefaultCommitStyleReviewPromptTemplate = `` /* 1095-byte string literal not displayed */

DefaultCommitStyleReviewPromptTemplate is used for reviewing commit message style.

View Source
const DefaultPromptTemplate = `` /* 1602-byte string literal not displayed */

DefaultPromptTemplate is used if no template is configured for commit message generation.

Variables

This section is empty.

Functions

func BuildCodeReviewPrompt

func BuildCodeReviewPrompt(diff, language, promptTemplate string) string

BuildCodeReviewPrompt builds the prompt for a code review. It replaces placeholders with the provided diff and language.

func BuildCommitPrompt

func BuildCommitPrompt(diff, language, commitType, additionalText, promptTemplate string) string

BuildCommitPrompt builds the prompt for generating a commit message. It replaces placeholders with the provided diff, language, commit type, and any additional context.

func BuildCommitStyleReviewPrompt

func BuildCommitStyleReviewPrompt(commitMsg, language, promptTemplate string) string

BuildCommitStyleReviewPrompt builds the prompt for reviewing the style of a commit message. It replaces placeholders with the commit message and language.

func BuildCommitSummaryPrompt added in v0.5.0

func BuildCommitSummaryPrompt(commit *gogitobj.Commit, diffStr, customPromptTemplate, language string) string

BuildCommitSummaryPrompt constructs the prompt used to ask the AI for a commit summary. It replaces placeholders with actual commit information and the diff string.

func ExtractSummaryAfterGeneral added in v0.5.0

func ExtractSummaryAfterGeneral(aiOutput string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL