{"modulePath":"github.com/nuitsjp/commit-spark","version":"v0.1.0","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package commitmsg\n\nPackage commitmsg builds the LLM prompt for a commit message and sanitizes the model's response.\n\n## Functions\n\n```go\nfunc Generate(ctx context.Context, opts GenerateOptions) (string, error)\n```\nGenerate builds the system prompt, invokes codexcli.Run once, and returns the sanitized single-line commit message.\n\n```go\nfunc GeneratePrompt(locale string, maxLength int, commitType string, customPrompt string) string\n```\nGeneratePrompt builds the system prompt sent to the LLM for the given locale, max commit-message length, commit message type, and optional user-supplied custom prompt fragment.\n\n## Types\n\n```go\ntype GenerateOptions struct {\n\tModel        string\n\tLocale       string\n\tDiff         string\n\tMaxLength    int\n\tType         string\n\tTimeout      time.Duration\n\tCustomPrompt string\n\t// Debug, when true, logs the diff being sent to the AI to stdout. The\n\t// caller is responsible for deciding whether debug logging should be\n\t// enabled (e.g. based on DEBUG/CSP_DEBUG env vars and headless mode).\n\tDebug bool\n}\n```\nGenerateOptions configures Generate.\n\n","path":"github.com/nuitsjp/commit-spark/internal/commitmsg","name":"commitmsg","synopsis":"Package commitmsg builds the LLM prompt for a commit message and sanitizes the model's response.","isRedistributable":true}
