ai-git-tools 2.0.44 → 2.0.45
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/package.json
CHANGED
package/src/commands/autodev.js
CHANGED
|
@@ -42,6 +42,15 @@ export async function autodevCommand(issueInput, cliOptions = {}) {
|
|
|
42
42
|
commitOnly: cliOptions.commitOnly ?? false,
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
// 永遠顯示啟動設定,方便確認
|
|
46
|
+
console.log('📋 autodev 啟動設定:');
|
|
47
|
+
console.log(` AI 模型 : ${config.aiModel}`);
|
|
48
|
+
console.log(` 重試次數 : ${config.maxRetries}`);
|
|
49
|
+
console.log(` 測試框架 : ${options.framework ?? '自動偵測'}`);
|
|
50
|
+
console.log(` Commit : ${options.skipAll || options.skipCommit ? '跳過' : '自動'}`);
|
|
51
|
+
console.log(` PR : ${options.skipAll || options.skipPr || options.commitOnly ? '跳過' : '自動'}`);
|
|
52
|
+
if (options.dryRun) console.log(' ⚠️ 乾運行模式(不實際執行)');
|
|
53
|
+
|
|
45
54
|
const workflow = new AutodevWorkflow(config);
|
|
46
55
|
await workflow.execute(issueInput, options);
|
|
47
56
|
} catch (error) {
|
|
@@ -28,7 +28,11 @@ export class CodeGenerator {
|
|
|
28
28
|
async generateCodeFiles(issueData, projectRoot = process.cwd()) {
|
|
29
29
|
const prompt = this._buildPrompt(issueData, projectRoot);
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
const VALID_MODELS = ['gpt-4.1', 'gpt-4o', 'claude-haiku-4.5', 'claude-sonnet-4.5', 'o3', 'o4-mini'];
|
|
32
|
+
if (!VALID_MODELS.includes(this.model)) {
|
|
33
|
+
console.warn(` ⚠️ model「${this.model}」可能無效!支援的模型:${VALID_MODELS.join(', ')}`);
|
|
34
|
+
}
|
|
35
|
+
console.log(` 🤖 調用 AI 生成代碼框架(model: ${this.model},最多等待 3 分鐘)...`);
|
|
32
36
|
|
|
33
37
|
let response;
|
|
34
38
|
try {
|