@jetthai/cuora 1.1.457 → 1.1.460
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +252 -554
- package/AGENTS.md +252 -554
- package/AI_PROMPT_SOURCE.md +199 -565
- package/CHANGELOG.md +6 -0
- package/CLAUDE.md +252 -554
- package/GEMINI.md +252 -554
- package/README.md +25 -15
- package/package.json +1 -1
- package/prepare-for-pr/JT-1776243420.md +85 -0
- package/src/machine/deposit/crypto_bank_cash.js +4 -5
- package/src/machine/deposit/crypto_way_cash.js +4 -5
- package/src/machine/deposit/direct_cash.js +7 -3
- package/src/machine/deposit/loadcard_cash.js +7 -8
- package/src/machine/deposit/manual_cash.js +8 -2
- package/src/machine/deposit/qrcode_cash.js +5 -7
- package/src/machine/deposit/virtual_bank_cash.js +5 -2
- package/.claude/commands/commit-push.md +0 -174
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
# Commit & Push
|
|
2
|
-
|
|
3
|
-
執行 git commit 和 push 流程,支援多種 commit message 生成方式。
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Step 1 — 同步遠端分支
|
|
8
|
-
|
|
9
|
-
檢查當前分支的遠端是否有更新:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
git fetch origin
|
|
13
|
-
git status
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
如果本地已經是最新(沒有 behind commits),直接進入 Step 2。
|
|
17
|
-
|
|
18
|
-
如果遠端有更新(本地 behind),執行 pull:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
git pull
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
如果 pull 發生衝突:
|
|
25
|
-
|
|
26
|
-
1. 取消 merge:
|
|
27
|
-
```bash
|
|
28
|
-
git merge --abort
|
|
29
|
-
```
|
|
30
|
-
2. 告知使用者:「遠端有更新且與本地變更衝突,請先還原當前所有檔案的異動,還原完成後請回覆。」
|
|
31
|
-
3. 等待使用者回覆。
|
|
32
|
-
4. 使用者回覆後,重新執行 pull:
|
|
33
|
-
```bash
|
|
34
|
-
git pull
|
|
35
|
-
```
|
|
36
|
-
5. Pull 成功後,告知使用者:「遠端同步完成,請將剛才還原的異動重新加回,完成後請回覆。」
|
|
37
|
-
6. 等待使用者回覆確認已全部加回,再繼續後續流程。
|
|
38
|
-
|
|
39
|
-
出現錯誤則停止,詢問使用者要怎麼做。
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Step 2 — 檢查工作區狀態
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
git status
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
如果沒有任何變更(工作區乾淨),告知使用者「沒有需要提交的變更」並停止。
|
|
50
|
-
|
|
51
|
-
如果有變更,顯示變更檔案清單給使用者確認。
|
|
52
|
-
|
|
53
|
-
出現錯誤則停止,詢問使用者要怎麼做。
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Step 3 — Stage 變更
|
|
58
|
-
|
|
59
|
-
將所有變更加入 staging area:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
git add -A
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
出現錯誤則停止,詢問使用者要怎麼做。
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Step 4 — 選擇 Commit Message 方式
|
|
70
|
-
|
|
71
|
-
使用 `AskUserQuestion` 工具顯示選單,讓使用者從以下選項中選擇:
|
|
72
|
-
|
|
73
|
-
- **自動生成** — AI 根據異動自動生成,直接使用
|
|
74
|
-
- **自動生成 + 修改** — AI 自動生成後,顯示給使用者確認或修改
|
|
75
|
-
- **手動輸入** — 完全由使用者手動輸入 commit message
|
|
76
|
-
|
|
77
|
-
使用者也可以選擇「Other」輸入自訂指示,AI 會根據指示和異動內容生成 commit message 並顯示給使用者確認。
|
|
78
|
-
|
|
79
|
-
等待使用者選擇。
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Step 5 — 生成 Commit Message
|
|
84
|
-
|
|
85
|
-
根據使用者在 Step 3 的選擇執行:
|
|
86
|
-
|
|
87
|
-
### 選項 1 或 2:自動生成
|
|
88
|
-
|
|
89
|
-
分析 `git diff --cached` 的內容,生成符合 Conventional Commits 格式的 commit message:
|
|
90
|
-
|
|
91
|
-
- 格式:`type(scope): description`
|
|
92
|
-
- type:feat / fix / refactor / style / docs / chore / perf / test
|
|
93
|
-
- scope:根據變更的主要目錄或功能模組決定(可省略)
|
|
94
|
-
- description:簡潔描述變更內容(中文)
|
|
95
|
-
|
|
96
|
-
當變更涉及多個不同類型或模組時,自行分類並以條列式呈現:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
type(scope): 主要描述
|
|
100
|
-
|
|
101
|
-
- type(scope): 細項描述 1
|
|
102
|
-
- type(scope): 細項描述 2
|
|
103
|
-
- type(scope): 細項描述 3
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
例如:
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
feat(payment): 新增加密貨幣存款功能
|
|
110
|
-
|
|
111
|
-
- feat(deposit): 新增 USDT 存款方式
|
|
112
|
-
- fix(withdraw): 修正提款金額驗證邏輯
|
|
113
|
-
- style(modal): 調整存款彈窗樣式
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
如果是選項 2,將生成的 message 顯示給使用者,等待使用者確認或提供修改後的版本。
|
|
117
|
-
|
|
118
|
-
### 選項 3:手動輸入
|
|
119
|
-
|
|
120
|
-
等待使用者輸入完整的 commit message。
|
|
121
|
-
|
|
122
|
-
### 選項 4:其他
|
|
123
|
-
|
|
124
|
-
等待使用者輸入自訂指示,然後結合 `git diff --cached` 的異動內容,根據使用者的指示生成 commit message,顯示給使用者確認或修改。
|
|
125
|
-
|
|
126
|
-
出現錯誤則停止,詢問使用者要怎麼做。
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Step 6 — 執行 Commit
|
|
131
|
-
|
|
132
|
-
使用確定的 commit message 執行 commit:
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
git commit -m "<commit_message>"
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
如果 commit message 包含多行,使用:
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
git commit -m "<title>" -m "<body>"
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
出現錯誤則停止,詢問使用者要怎麼做。
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Step 7 — 執行 Push
|
|
149
|
-
|
|
150
|
-
Commit 完成後直接執行 push,不需詢問使用者。
|
|
151
|
-
|
|
152
|
-
將 commit push 到遠端:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
git push
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
如果當前分支沒有設定 upstream,使用:
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
git push --set-upstream origin <current_branch>
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
出現錯誤則停止,詢問使用者要怎麼做。
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Step 8 — 完成回報
|
|
169
|
-
|
|
170
|
-
顯示以下資訊:
|
|
171
|
-
|
|
172
|
-
- 分支名稱
|
|
173
|
-
- Commit message 內容
|
|
174
|
-
- Push 結果(成功/失敗)
|