appleboy / CodeGPT

A CLI written in Go language that writes git commit messages or do a code review brief for you using ChatGPT AI (gpt-4o, gpt-4-turbo, gpt-3.5-turbo model) and automatically installs a git prepare-commit-msg hook.
MIT License
1.15k stars 100 forks source link

Traditional Chinese commit messages issues #137

Open doggy8088 opened 7 months ago

doggy8088 commented 7 months ago

When I use the following config settings, the Commit Summary seems a little bit strange.

codegpt config set openai.model gpt-4-32k
codegpt config set openai.model_name gpt-4-32k
codegpt config set output.lang zh-tw
codegpt config set git.diff_unified 5

Here is the output. There are few issues should be take care of.

codegpt commit --preview

image

Here are the steps to reproduce the issue:

git clone https://github.com/doggy8088/gh-copilot.git -b will/fix
cd gh-copilot
git reset --soft HEAD~
codegpt commit --preview --lang zh-tw

image

Here is my git diff result:

diff --git a/README.md b/README.md
index 50f5ebe..aa0753d 100644
--- a/README.md
+++ b/README.md
@@ -18,11 +18,11 @@
 * 課程全程錄影,學員課後 3 個月內可免費無限次重播!

 ## 報名連結

 * 2023.12.01 (五) 20:00 - 22:00 [GitHub Copilot 協作開發實戰 (第一梯次)](https://www.accupass.com/go/gh-copilot) (已額滿)
-* 2023.12.08 (五) 20:00 - 22:00 [GitHub Copilot 協作開發實戰 (第二梯次)](https://www.accupass.com/go/gh-copilot-2) (熱烈報名中...)
+* 2023.12.08 (五) 20:00 - 22:00 [GitHub Copilot 協作開發實戰 (第二梯次)](https://www.accupass.com/go/gh-copilot-2) (即將額滿...)

 ## 給學員的話

 各位同學大家好:

@@ -50,12 +50,12 @@

 ![GitHub Copilot](images/github-copilot.jpg)

 然後選擇你要購買的方案,目前有兩種方案可供選擇:

-1. 月繳 $10 美元
-2. 年繳 $100 美元 (一年可以省下 $20 美元)
+1. 月繳 `$10` 美元
+2. 年繳 `$100` 美元 (一年可以省下 `$20` 美元)

 ![GitHub Copilot - Buy now](images/github-copilot-buy.jpg)

 ## 安裝 GitHub 支援的開發工具

@@ -216,10 +216,10 @@ GitHub Copilot 的功能也是透過安裝擴充套件來實現的,你需要

 我們會在上課前一兩天發送「上課通知」信件給學員,信件內容包含:

 1. 寄件者:`julie@miniasp.com` 或 `service@accupass.com`

-2. 郵件主旨:`【上課通知】GitHub Copilot 協作開發實戰 1201`
+2. 郵件主旨:`【上課通知】GitHub Copilot 協作開發實戰 1208`

 3. 郵件內容:包含課前注意事項、進入 Zoom 會議室的「會議號碼」與「會議密碼」、進入會議室之後的「顯示名稱」、Slido 提問網站的「活動代碼」等資訊。

 如果你沒有收到通知郵件,請立即[寫信](mailto:training@miniasp.com)與我們聯繫!🔥

The code review has the same issue:

image

appleboy commented 7 months ago

@doggy8088 Thanks. I will take it.