@@ -378,39 +378,36 @@ if [ $RECENT_COMMITS -gt 0 ]; then
378378fi
379379
380380# Include default prompt if available
381- if [ -f " prompts/git-context_prompt .txt" ]; then
381+ if [ -f " prompts/commit_prompt .txt" ]; then
382382 case $FORMAT in
383383 md)
384384 echo " ## Commit Message Guidance"
385385 echo " "
386- cat " prompts/git-context_prompt .txt"
387- if [ " $CONVENTIONAL " = true ]; then
386+ cat " prompts/commit_prompt .txt"
387+ if [ " $CONVENTIONAL " = true ] && [ -f " prompts/conventional_commit.txt " ] ; then
388388 echo " "
389- echo " Please use conventional commit format: type(scope): description"
390- echo " - Types: feat, fix, docs, style, refactor, perf, test, chore"
391- echo " - Example: \" feat(button): add disabled state handling\" "
389+ cat " prompts/conventional_commit.txt"
392390 fi
393391 echo " "
394392 ;;
395393 json)
396394 echo " ,"
397395 echo " \" commit_guidance\" : {"
398- guidance_json=$( cat " prompts/git-context_prompt .txt" | sed ' s/"/\\"/g' | sed ' s/\\n/\\\\n/g' )
396+ guidance_json=$( cat " prompts/commit_prompt .txt" | sed ' s/"/\\"/g' | sed ' s/\\n/\\\\n/g' )
399397 echo " \" content\" : \" $guidance_json \" "
400- if [ " $CONVENTIONAL " = true ]; then
401- echo " \" conventional\" : true"
398+ if [ " $CONVENTIONAL " = true ] && [ -f " prompts/conventional_commit.txt" ]; then
399+ conventional_json=$( cat " prompts/conventional_commit.txt" | sed ' s/"/\\"/g' | sed ' s/\\n/\\\\n/g' )
400+ echo " ,\" conventional\" : \" $conventional_json \" "
402401 fi
403402 echo " }"
404403 ;;
405404 text)
406405 echo " COMMIT MESSAGE GUIDANCE"
407406 echo " ----------------------"
408- cat " prompts/git-context_prompt .txt"
409- if [ " $CONVENTIONAL " = true ]; then
407+ cat " prompts/commit_prompt .txt"
408+ if [ " $CONVENTIONAL " = true ] && [ -f " prompts/conventional_commit.txt " ] ; then
410409 echo " "
411- echo " Please use conventional commit format: type(scope): description"
412- echo " - Types: feat, fix, docs, style, refactor, perf, test, chore"
413- echo " - Example: \" feat(button): add disabled state handling\" "
410+ cat " prompts/conventional_commit.txt"
414411 fi
415412 echo " "
416413 ;;
0 commit comments