@jetthai/cuora 1.1.413-5 → 1.1.413-dev-1
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/CHANGELOG.md +13 -3
- package/CLAUDE.md +39 -823
- package/package.json +1 -1
- package/src/api/activity.js +0 -6
- package/src/api/payment.js +15 -3
- package/src/machine/deposit/crypto_bank_cash.js +1 -1
- package/src/machine/deposit/crypto_way_cash.js +4 -3
- package/src/machine/game_v2_1.js +0 -4
- package/src/machine/leaderboard.js +11 -8
- package/src/machine/withdraw/withdraw_manual.js +19 -16
- package/src/machine/withdraw/withdraw_manual_cash.js +23 -31
- package/.claude/commands/auto-git-flow.md +0 -95
- package/.claude/commands/sync-ai-prompts.md +0 -93
- package/.github/copilot-instructions.md +0 -848
- package/AGENTS.md +0 -848
- package/AI_PROMPT_SOURCE.md +0 -846
- package/GEMINI.md +0 -848
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -87,12 +87,6 @@ export default {
|
|
|
87
87
|
getVipTable: ({ appSecret }) => ({ url: 'activities/viptable', method: 'get', params: { appSecret } }),
|
|
88
88
|
getLevelBonusInfo: () => ({ url: 'activities/level-bonus/info', method: 'get' }),
|
|
89
89
|
getRankingList: () => ({ url: 'activities/ranking', method: 'get' }),
|
|
90
|
-
getPublicRankingList: ({ appSecret }) => ({
|
|
91
|
-
url: 'activities/ranking/public/promotion-ranking',
|
|
92
|
-
method: 'get',
|
|
93
|
-
isPublic: true,
|
|
94
|
-
params: { appSecret },
|
|
95
|
-
}),
|
|
96
90
|
exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
|
|
97
91
|
url: 'activities/exchange/diamond',
|
|
98
92
|
method: 'post',
|
package/src/api/payment.js
CHANGED
|
@@ -176,12 +176,12 @@ export default {
|
|
|
176
176
|
params: { transferType: 'DEPOSIT', amount, promotionsNo },
|
|
177
177
|
}),
|
|
178
178
|
submitWithdrawTransactionCrypto: ({ method, amount, cryptoCurrency, cryptoNetwork, targetAddress, applyerHolderName }) => ({
|
|
179
|
-
url:
|
|
179
|
+
url: `/payment/v2/${method}/withdraw-otp/verify`,
|
|
180
180
|
method: 'post',
|
|
181
181
|
params: { transferType: 'WITHDRAW', amount, cryptoCurrency, cryptoNetwork, targetAddress, applyerHolderName },
|
|
182
182
|
}),
|
|
183
183
|
submitWithdrawTransactionVN: ({ method, amount, applyerBankCode, applyerAccountNumber, applyerIfscCode, branch, applyerHolderName }) => ({
|
|
184
|
-
url:
|
|
184
|
+
url: `/payment/v2/${method}/withdraw-otp/verify`,
|
|
185
185
|
method: 'post',
|
|
186
186
|
params: {
|
|
187
187
|
transferType: 'WITHDRAW',
|
|
@@ -205,7 +205,7 @@ export default {
|
|
|
205
205
|
cryptoNetwork,
|
|
206
206
|
targetAddress,
|
|
207
207
|
}) => ({
|
|
208
|
-
url: `payment/v2/${method}/
|
|
208
|
+
url: `payment/v2/${method}/withdraw-otp/verify`,
|
|
209
209
|
method: 'post',
|
|
210
210
|
params: {
|
|
211
211
|
transferType: 'WITHDRAW',
|
|
@@ -247,4 +247,16 @@ export default {
|
|
|
247
247
|
withdrawCheck: () => ({ url: `payment/v2/withdrawCheck`, method: 'post' }),
|
|
248
248
|
updateUtr: ({ applyId, utr }) => ({ url: 'payment/v2/updateUtr', method: 'post', params: { applyId, utr } }),
|
|
249
249
|
uploadCommonSlip: ({ applyId, slip }) => ({ url: 'payment/v2/uploadCommonSlip', method: 'post', params: { applyId, slip } }),
|
|
250
|
+
otpAcknowledge: ({ method, requestId, code }) => ({
|
|
251
|
+
url: `/payment/v2/${method}/withdraw-otp/acknowledge`,
|
|
252
|
+
method: 'post',
|
|
253
|
+
params: { requestId, code },
|
|
254
|
+
isPublic: true,
|
|
255
|
+
}),
|
|
256
|
+
otpReset: ({ method, requestId }) => ({
|
|
257
|
+
url: `/payment/v2/${method}/withdraw-otp/reset-otp`,
|
|
258
|
+
method: 'post',
|
|
259
|
+
params: { requestId },
|
|
260
|
+
isPublic: true,
|
|
261
|
+
}),
|
|
250
262
|
}
|
|
@@ -286,7 +286,7 @@ export default function (request, context) {
|
|
|
286
286
|
method: selectedCrypto.value,
|
|
287
287
|
amount: selectedAmount,
|
|
288
288
|
cryptoCurrency: selectedCrypto.symbol,
|
|
289
|
-
cryptoNetwork: selectedCrypto.
|
|
289
|
+
cryptoNetwork: selectedCrypto.networkCode,
|
|
290
290
|
sourceAddress: selectedCrypto.address,
|
|
291
291
|
promotionsNo: promotion?.promotionsNo,
|
|
292
292
|
depositTime,
|
|
@@ -132,10 +132,11 @@ export default function (request, context) {
|
|
|
132
132
|
const payments = paymentDetail.filter((item) => item.category === context.currentCategory)
|
|
133
133
|
const cryptos = payments.map((payment) => ({
|
|
134
134
|
...payment,
|
|
135
|
-
label: payment.
|
|
136
|
-
network: payment.networkName?.[0],
|
|
135
|
+
label: `${payment?.currency} - ${payment.networks?.[0]?.networkDisplayName}`,
|
|
136
|
+
// network: payment.networkName?.[0], // 改由 networkCode 取代
|
|
137
137
|
value: payment.method,
|
|
138
138
|
icon: payment.channel,
|
|
139
|
+
networkCode: payment.networks?.[0]?.networkCode,
|
|
139
140
|
}))
|
|
140
141
|
|
|
141
142
|
return {
|
|
@@ -245,7 +246,7 @@ export default function (request, context) {
|
|
|
245
246
|
method: selectedCrypto.method,
|
|
246
247
|
amount: selectedAmount,
|
|
247
248
|
cryptoCurrency: selectedCrypto.channel,
|
|
248
|
-
cryptoNetwork: selectedCrypto.
|
|
249
|
+
cryptoNetwork: selectedCrypto.networkCode,
|
|
249
250
|
sourceAddress: sourceAddress,
|
|
250
251
|
promotionsNo: promotion?.promotionsNo,
|
|
251
252
|
})
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -390,10 +390,6 @@ export default function (request) {
|
|
|
390
390
|
}),
|
|
391
391
|
appendContent: assign((context, event) => {
|
|
392
392
|
const { room, additionEnable } = context
|
|
393
|
-
// [防呆] 確保有 categoryId
|
|
394
|
-
if (!room?.categoryId) {
|
|
395
|
-
return
|
|
396
|
-
}
|
|
397
393
|
if (room.categoryId === GAME_SEARCH) {
|
|
398
394
|
return
|
|
399
395
|
} else if (additionEnable) {
|
|
@@ -37,13 +37,12 @@ export default function (request) {
|
|
|
37
37
|
checking: {
|
|
38
38
|
always: [
|
|
39
39
|
{ target: 'idle', actions: 'setActivityDetail', cond: 'isExist' },
|
|
40
|
-
{ target: 'loading', cond: '
|
|
41
|
-
{ target: 'idle' },
|
|
40
|
+
{ target: 'loading', cond: 'hasActivityNo' },
|
|
42
41
|
],
|
|
43
42
|
},
|
|
44
43
|
loading: {
|
|
45
44
|
invoke: {
|
|
46
|
-
src: '
|
|
45
|
+
src: 'fetchPublicActivityDetail',
|
|
47
46
|
onDone: {
|
|
48
47
|
target: 'idle',
|
|
49
48
|
actions: ['setActivityMap', 'setActivityDetail'],
|
|
@@ -101,9 +100,8 @@ export default function (request) {
|
|
|
101
100
|
const { activityMap, activityNo } = context
|
|
102
101
|
return activityMap[activityNo]
|
|
103
102
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return !!context.activityNo && hasToken
|
|
103
|
+
hasActivityNo: (context, event) => {
|
|
104
|
+
return !!context.activityNo
|
|
107
105
|
},
|
|
108
106
|
},
|
|
109
107
|
services: {
|
|
@@ -118,10 +116,15 @@ export default function (request) {
|
|
|
118
116
|
const { data } = await request.send(hasToken ? api.getActivityList({ appSecret }) : api.getAllActivityList({ appSecret }))
|
|
119
117
|
return data
|
|
120
118
|
},
|
|
121
|
-
|
|
119
|
+
fetchPublicActivityDetail: async (context, event) => {
|
|
120
|
+
const hasToken = request.getToken()
|
|
122
121
|
const { activityNo } = context
|
|
123
122
|
let result = {}
|
|
124
|
-
|
|
123
|
+
if (hasToken) {
|
|
124
|
+
result = await request.send(api.getActivityDetail({ activityNo, appSecret }))
|
|
125
|
+
} else {
|
|
126
|
+
result = await request.send(api.getTournamentDetail({ activityNo, appSecret }))
|
|
127
|
+
}
|
|
125
128
|
return result.data
|
|
126
129
|
},
|
|
127
130
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { assign, createMachine } from 'xstate'
|
|
2
2
|
import findLastIndex from 'lodash/findLastIndex.js'
|
|
3
3
|
import payment from '../../api/payment.js'
|
|
4
|
-
import user from '../../api/user.js'
|
|
5
4
|
|
|
6
5
|
export default function (request) {
|
|
7
6
|
const { appSecret } = request.config
|
|
@@ -36,8 +35,8 @@ export default function (request) {
|
|
|
36
35
|
|
|
37
36
|
// otp
|
|
38
37
|
requestId: null,
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
number: null,
|
|
39
|
+
email: null,
|
|
41
40
|
ttl: null,
|
|
42
41
|
},
|
|
43
42
|
states: {
|
|
@@ -356,26 +355,27 @@ export default function (request) {
|
|
|
356
355
|
return { paymentDetail }
|
|
357
356
|
}),
|
|
358
357
|
setOtp: assign((context, event) => {
|
|
359
|
-
const {
|
|
358
|
+
const { request_id, number, email, ttl } = event.data
|
|
360
359
|
return {
|
|
361
|
-
requestId,
|
|
362
|
-
|
|
363
|
-
|
|
360
|
+
requestId: request_id,
|
|
361
|
+
number,
|
|
362
|
+
email,
|
|
364
363
|
ttl,
|
|
365
364
|
}
|
|
366
365
|
}),
|
|
367
366
|
decreaseTtl: assign((context, evnet) => {
|
|
368
367
|
const second = context.ttl
|
|
369
368
|
return {
|
|
370
|
-
ttl: Math.max(second -
|
|
369
|
+
ttl: Math.max(second - 1000, 0),
|
|
371
370
|
}
|
|
372
371
|
}),
|
|
373
372
|
setVerificationData: assign((context, event) => {
|
|
374
|
-
const {
|
|
373
|
+
const { request_id, number, email, ttl } = event.data
|
|
375
374
|
return {
|
|
376
|
-
requestId,
|
|
375
|
+
requestId: request_id,
|
|
376
|
+
number,
|
|
377
|
+
email,
|
|
377
378
|
ttl,
|
|
378
|
-
target,
|
|
379
379
|
}
|
|
380
380
|
}),
|
|
381
381
|
setAttachmentType: assign((context, event) => {
|
|
@@ -439,7 +439,8 @@ export default function (request) {
|
|
|
439
439
|
return !enableWithdraw || balance < minWithdrawAmount
|
|
440
440
|
},
|
|
441
441
|
isOtpRequired: (context, event) => {
|
|
442
|
-
|
|
442
|
+
const { request_id, number, email } = event.data || {}
|
|
443
|
+
return request_id !== undefined && (number || email)
|
|
443
444
|
},
|
|
444
445
|
isNotWithdrawMinDepositAmount: (context, event) => {
|
|
445
446
|
const { withdrawCheck } = context
|
|
@@ -509,13 +510,15 @@ export default function (request) {
|
|
|
509
510
|
return await request.send(payment.convertFreeCredit({ exchangeType: 1 }))
|
|
510
511
|
},
|
|
511
512
|
resetOtp: async (context, event) => {
|
|
512
|
-
const { requestId
|
|
513
|
-
|
|
513
|
+
const { requestId } = context
|
|
514
|
+
const { method } = context.paymentDetail[0]
|
|
515
|
+
return await request.send(payment.otpReset({ method: method, requestId }))
|
|
514
516
|
},
|
|
515
517
|
acknowledge: async (context, event) => {
|
|
516
|
-
const { requestId
|
|
518
|
+
const { requestId } = context
|
|
519
|
+
const { method } = context.paymentDetail[0]
|
|
517
520
|
const code = event.data
|
|
518
|
-
return await request.send(
|
|
521
|
+
return await request.send(payment.otpAcknowledge({ method: method, requestId, code }))
|
|
519
522
|
},
|
|
520
523
|
pool: async (context, event) => {
|
|
521
524
|
const { amount } = context
|
|
@@ -23,6 +23,8 @@ export default function (request, context) {
|
|
|
23
23
|
requestId: null,
|
|
24
24
|
status: null,
|
|
25
25
|
target: null,
|
|
26
|
+
email: null,
|
|
27
|
+
number: null,
|
|
26
28
|
ttl: null,
|
|
27
29
|
},
|
|
28
30
|
states: {
|
|
@@ -117,29 +119,18 @@ export default function (request, context) {
|
|
|
117
119
|
RESET_OTP: {
|
|
118
120
|
target: 'reset',
|
|
119
121
|
},
|
|
120
|
-
BACK:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// cond: 'isActivity',
|
|
124
|
-
// },
|
|
125
|
-
// {
|
|
126
|
-
// target: '#withdraw_vn2.cash.withdrawable',
|
|
127
|
-
// },
|
|
128
|
-
],
|
|
122
|
+
BACK: {
|
|
123
|
+
target: '#withdraw_manual_cash.calculated',
|
|
124
|
+
},
|
|
129
125
|
},
|
|
130
126
|
},
|
|
131
127
|
acknowledging: {
|
|
132
128
|
invoke: {
|
|
133
129
|
src: 'acknowledge',
|
|
134
|
-
onDone:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
// },
|
|
139
|
-
// {
|
|
140
|
-
// target: '#withdraw_vn2.cash.submitted',
|
|
141
|
-
// },
|
|
142
|
-
],
|
|
130
|
+
onDone: {
|
|
131
|
+
target: '#withdraw_manual_cash.submitted',
|
|
132
|
+
actions: 'setProcessing',
|
|
133
|
+
},
|
|
143
134
|
onError: {
|
|
144
135
|
target: 'idle',
|
|
145
136
|
},
|
|
@@ -203,26 +194,27 @@ export default function (request, context) {
|
|
|
203
194
|
}
|
|
204
195
|
}),
|
|
205
196
|
setOtp: assign((context, event) => {
|
|
206
|
-
const {
|
|
197
|
+
const { request_id, email, number, ttl } = event.data
|
|
207
198
|
return {
|
|
208
|
-
requestId,
|
|
209
|
-
|
|
210
|
-
|
|
199
|
+
requestId: request_id,
|
|
200
|
+
email,
|
|
201
|
+
number,
|
|
211
202
|
ttl,
|
|
212
203
|
}
|
|
213
204
|
}),
|
|
214
205
|
decreaseTtl: assign((context, evnet) => {
|
|
215
206
|
const second = context.ttl
|
|
216
207
|
return {
|
|
217
|
-
ttl: Math.max(second -
|
|
208
|
+
ttl: Math.max(second - 1000, 0),
|
|
218
209
|
}
|
|
219
210
|
}),
|
|
220
211
|
setVerificationData: assign((context, event) => {
|
|
221
|
-
const {
|
|
212
|
+
const { request_id, ttl, number, email } = event.data
|
|
222
213
|
return {
|
|
223
|
-
requestId,
|
|
214
|
+
requestId: request_id,
|
|
224
215
|
ttl,
|
|
225
|
-
|
|
216
|
+
number,
|
|
217
|
+
email,
|
|
226
218
|
}
|
|
227
219
|
}),
|
|
228
220
|
},
|
|
@@ -238,7 +230,7 @@ export default function (request, context) {
|
|
|
238
230
|
return selectedUserBank && selectedAmount > 0 && currentPayment.minimum <= selectedAmount && selectedAmount <= currentPayment.maximum
|
|
239
231
|
},
|
|
240
232
|
isOtpRequired: (context, event) => {
|
|
241
|
-
return event.data?.
|
|
233
|
+
return event.data?.request_id !== undefined
|
|
242
234
|
},
|
|
243
235
|
},
|
|
244
236
|
services: {
|
|
@@ -289,13 +281,13 @@ export default function (request, context) {
|
|
|
289
281
|
)
|
|
290
282
|
},
|
|
291
283
|
resetOtp: async (context, event) => {
|
|
292
|
-
const {
|
|
293
|
-
return await request.send(
|
|
284
|
+
const { currentPayment, requestId } = context
|
|
285
|
+
return await request.send(payment.otpReset({ method: currentPayment.method, requestId }))
|
|
294
286
|
},
|
|
295
287
|
acknowledge: async (context, event) => {
|
|
296
|
-
const {
|
|
288
|
+
const { currentPayment, requestId } = context
|
|
297
289
|
const code = event.data
|
|
298
|
-
return await request.send(
|
|
290
|
+
return await request.send(payment.otpAcknowledge({ method: currentPayment.method, requestId, code }))
|
|
299
291
|
},
|
|
300
292
|
},
|
|
301
293
|
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# Auto Git Flow
|
|
2
|
-
|
|
3
|
-
請依序執行每個步驟進行完整的分支重建和清理流程,每步執行前先告知使用者當前進度。
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Phase 1: 分支重建
|
|
8
|
-
|
|
9
|
-
### Step 1 — 同步 master
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
git fetch origin --prune
|
|
13
|
-
git checkout master && git pull origin master
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
### Step 2 — 重建 dev
|
|
17
|
-
|
|
18
|
-
刪除本地與遠端 dev,從 master 重新建立並強制推送。
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
git checkout master
|
|
22
|
-
git branch -D dev 2>/dev/null || true
|
|
23
|
-
git push origin --delete dev 2>/dev/null || true
|
|
24
|
-
git checkout -b dev
|
|
25
|
-
git push origin dev --force
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Step 3 — 重建 qa
|
|
29
|
-
|
|
30
|
-
刪除本地與遠端 qa,從 master 重新建立並強制推送。
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
git checkout master
|
|
34
|
-
git branch -D qa 2>/dev/null || true
|
|
35
|
-
git push origin --delete qa 2>/dev/null || true
|
|
36
|
-
git checkout -b qa
|
|
37
|
-
git push origin qa --force
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Phase 2: 清理
|
|
43
|
-
|
|
44
|
-
### Step 5 — 刪除已合併到 master 的分支
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
git checkout master
|
|
48
|
-
git fetch --prune
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
刪除已合併的 remote 分支(排除 master/qa/dev/HEAD):
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
git branch -r --merged master | grep -v -E "(master|qa|dev|HEAD)" | sed 's/origin\///' | xargs -r -I {} git push origin --delete {}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
刪除已合併的 local 分支(排除 master/qa/dev):
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
git branch --merged master | grep -v -E "^\*?\s*(master|qa|dev)$" | xargs -r git branch -d
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Step 6 — 刪除不合規 tags
|
|
64
|
-
|
|
65
|
-
刪除不符合 `v[數字].[數字].[數字]` 格式的 tags(local + remote):
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
PATTERN="^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$"
|
|
69
|
-
for tag in $(git tag -l); do
|
|
70
|
-
if [[ ! $tag =~ $PATTERN ]]; then
|
|
71
|
-
echo "刪除不合規 tag: $tag"
|
|
72
|
-
git push origin --delete "$tag" 2>/dev/null || true
|
|
73
|
-
git tag -d "$tag" 2>/dev/null || true
|
|
74
|
-
fi
|
|
75
|
-
done
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Phase 3: 完成
|
|
81
|
-
|
|
82
|
-
### Step 7 — 回報結果
|
|
83
|
-
|
|
84
|
-
切回 master 分支,顯示完成摘要:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
git checkout master
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
回報以下資訊:
|
|
91
|
-
|
|
92
|
-
- dev、qa 分支是否都成功重建
|
|
93
|
-
- 刪除了多少已合併分支
|
|
94
|
-
- 刪除了多少不合規 tags
|
|
95
|
-
- 當前所在分支
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Sync AI Prompts
|
|
2
|
-
|
|
3
|
-
將 `AI_PROMPT_SOURCE.md` 的內容同步到各 AI 工具的指令檔。
|
|
4
|
-
|
|
5
|
-
⚠️ 只修改 `AI_PROMPT_SOURCE.md` 作為唯一來源,其他檔案皆由此指令自動生成。
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Step 1 — 讀取來源檔
|
|
10
|
-
|
|
11
|
-
讀取 `AI_PROMPT_SOURCE.md` 完整內容。
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Step 2 — 同步 CLAUDE.md
|
|
16
|
-
|
|
17
|
-
將 `AI_PROMPT_SOURCE.md` 的內容**翻譯成英文**,並轉換為 CLAUDE.md 格式:
|
|
18
|
-
|
|
19
|
-
**翻譯規則**:同 Step 3。
|
|
20
|
-
|
|
21
|
-
**格式調整**:
|
|
22
|
-
|
|
23
|
-
- 第一行標題改為 `# CLAUDE.md`
|
|
24
|
-
- 第二行加上 `<!-- AUTO-SYNCED FROM AI_PROMPT_SOURCE.md — DO NOT EDIT DIRECTLY -->`
|
|
25
|
-
- 描述行改為:`This file provides guidance for Claude Code (claude.ai/code) when working in this project.`
|
|
26
|
-
- 其餘結構不變
|
|
27
|
-
|
|
28
|
-
寫入 `CLAUDE.md`。
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Step 3 — 同步 AGENTS.md(OpenAI Codex / Cursor / Windsurf)
|
|
33
|
-
|
|
34
|
-
將 `AI_PROMPT_SOURCE.md` 的內容**翻譯成英文**,並轉換為 AGENTS.md 格式:
|
|
35
|
-
|
|
36
|
-
**翻譯規則**:
|
|
37
|
-
|
|
38
|
-
- 所有繁體中文文字翻譯成英文
|
|
39
|
-
- 程式碼區塊中的**註解**翻譯成英文,**程式碼本身不動**
|
|
40
|
-
- 檔案路徑、變數名、函式名等技術名詞保持不變
|
|
41
|
-
- Markdown 結構(標題層級、列表、表格)保持不變
|
|
42
|
-
|
|
43
|
-
**格式調整**:
|
|
44
|
-
|
|
45
|
-
- 第一行標題改為 `# AGENTS.md`
|
|
46
|
-
- 第二行加上 `<!-- AUTO-SYNCED FROM AI_PROMPT_SOURCE.md — DO NOT EDIT DIRECTLY -->`
|
|
47
|
-
- 描述行改為:`This file provides guidance for AI coding agents when working on this project.`
|
|
48
|
-
- 其餘結構不變
|
|
49
|
-
|
|
50
|
-
寫入 `AGENTS.md`。
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Step 4 — 同步 GEMINI.md(Gemini CLI)
|
|
55
|
-
|
|
56
|
-
將 `AI_PROMPT_SOURCE.md` 的內容**翻譯成英文**,並轉換為 GEMINI.md 格式:
|
|
57
|
-
|
|
58
|
-
**翻譯規則**:同 Step 3。
|
|
59
|
-
|
|
60
|
-
**格式調整**:
|
|
61
|
-
|
|
62
|
-
- 第一行標題改為 `# GEMINI.md`
|
|
63
|
-
- 第二行加上 `<!-- AUTO-SYNCED FROM AI_PROMPT_SOURCE.md — DO NOT EDIT DIRECTLY -->`
|
|
64
|
-
- 描述行改為:`This file provides guidance for Gemini CLI when working on this project.`
|
|
65
|
-
- 其餘結構不變
|
|
66
|
-
|
|
67
|
-
寫入 `GEMINI.md`。
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Step 5 — 同步 .github/copilot-instructions.md(GitHub Copilot)
|
|
72
|
-
|
|
73
|
-
將 `AI_PROMPT_SOURCE.md` 的內容**翻譯成英文**,並轉換為 copilot-instructions.md 格式:
|
|
74
|
-
|
|
75
|
-
**翻譯規則**:同 Step 3。
|
|
76
|
-
|
|
77
|
-
**格式調整**:
|
|
78
|
-
|
|
79
|
-
- 第一行標題改為 `# Copilot Instructions`
|
|
80
|
-
- 第二行加上 `<!-- AUTO-SYNCED FROM AI_PROMPT_SOURCE.md — DO NOT EDIT DIRECTLY -->`
|
|
81
|
-
- 描述行改為:`This file provides guidance for GitHub Copilot when working on this project.`
|
|
82
|
-
- 其餘結構不變
|
|
83
|
-
|
|
84
|
-
寫入 `.github/copilot-instructions.md`。
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Step 6 — 回報結果
|
|
89
|
-
|
|
90
|
-
顯示完成摘要:
|
|
91
|
-
|
|
92
|
-
- 列出已同步的檔案及各自的行數/大小
|
|
93
|
-
- 提醒使用者需要 commit 這些變更
|