@snapcommit/cli 3.9.0 → 3.9.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.
@@ -1311,12 +1311,20 @@ async function getAIInterpretation(userInput, token) {
1311
1311
  },
1312
1312
  }),
1313
1313
  });
1314
- if (!response.ok)
1314
+ if (!response.ok) {
1315
+ const errorData = await response.json().catch(() => ({ error: 'Unknown error' }));
1316
+ console.error(chalk_1.default.red(`\n❌ AI API Error (${response.status}):`), errorData);
1315
1317
  return null;
1318
+ }
1316
1319
  const data = await response.json();
1320
+ // Debug: Show what AI returned
1321
+ if (process.env.DEBUG === 'true') {
1322
+ console.log(chalk_1.default.gray('[DEBUG] AI Response:'), JSON.stringify(data, null, 2));
1323
+ }
1317
1324
  return data.intent;
1318
1325
  }
1319
- catch {
1326
+ catch (error) {
1327
+ console.error(chalk_1.default.red('\n❌ Network/Parse Error:'), error.message);
1320
1328
  return null;
1321
1329
  }
1322
1330
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapcommit/cli",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "Instant AI commits. Beautiful progress tracking. Never write commit messages again.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {