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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-git-tools",
3
- "version": "2.0.44",
3
+ "version": "2.0.45",
4
4
  "description": "AI-powered Git automation tools for commit messages and PR generation",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -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) {
@@ -197,7 +197,7 @@ export async function loadAutodevConfig() {
197
197
  verbose: false,
198
198
  projectRoot: process.cwd(),
199
199
  // AI 設定(可被 autodev 子區塊或全域 ai 區塊覆蓋)
200
- aiModel: 'gpt-4.1',
200
+ aiModel: 'claude-sonnet-4.5',
201
201
  maxRetries: 3,
202
202
  };
203
203
 
@@ -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
- console.log(' 🤖 調用 AI 生成代碼框架(最多等待 3 分鐘)...');
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 {