Skip to content

Commit feb56c8

Browse files
committed
fix(lazygit): update commit message generation system prompt
The system prompt was updated to include "no fences" directive to ensure commit messages are output without code fence markers. Additionally, the prompt now requests that the subject of the change be included in parentheses when using conventional commit format with a specified type.
1 parent 84781a5 commit feb56c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.config/lazygit/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ customCommands:
634634
description: "Adding missing tests or correcting existing tests"
635635
value: "test"
636636
command: |
637-
system_prompt="Generate git commit messages. Output only the raw message, no commentary."
638-
prompt="Generate a commit message for the staged changes: a subject line (max 72 chars), blank line, then a body explaining what and why (wrap at 72 chars).{{ if .Form.Type }} Use conventional commit format with type: {{ .Form.Type }}.{{ end }}"
637+
system_prompt="Generate git commit messages. Output only the raw message, no commentary, no fences."
638+
prompt="Generate a commit message for the staged changes: a subject line (max 72 chars), blank line, then a body explaining what and why (wrap at 72 chars).{{ if .Form.Type }} Use conventional commit format with type: {{ .Form.Type }}, and try to include the subject of the change in parenthesis.{{ end }}"
639639
msg=$(claude --model haiku --output-format json --system-prompt "$system_prompt" -p "$prompt" \
640640
--tools "Bash,Read" | jq -r '.result')
641641
echo "$msg"

0 commit comments

Comments
 (0)