@snapcommit/cli 3.9.6 → 3.9.8

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.
@@ -1313,6 +1313,8 @@ async function getAIInterpretation(userInput, token) {
1313
1313
  try {
1314
1314
  const currentBranch = (0, git_1.getCurrentBranch)();
1315
1315
  const status = (0, git_1.getGitStatus)();
1316
+ // Show loading indicator for slow AI responses
1317
+ console.log(chalk_1.default.blue('šŸ¤” Understanding your command...'));
1316
1318
  const response = await fetch('https://www.snapcommit.dev/api/ai/interpret', {
1317
1319
  method: 'POST',
1318
1320
  headers: { 'Content-Type': 'application/json' },
@@ -1326,6 +1328,8 @@ async function getAIInterpretation(userInput, token) {
1326
1328
  remoteBranch: (0, child_process_1.execSync)('git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo ""', { encoding: 'utf-8' }).trim(),
1327
1329
  },
1328
1330
  }),
1331
+ // Increase timeout to 30 seconds for AI processing
1332
+ signal: AbortSignal.timeout(30000),
1329
1333
  });
1330
1334
  if (!response.ok) {
1331
1335
  const errorData = await response.json().catch(() => ({ error: 'Unknown error' }));
package/dist/repl.js CHANGED
@@ -126,6 +126,21 @@ async function startREPL() {
126
126
  rl.close();
127
127
  process.exit(0);
128
128
  }
129
+ // Complete merge command (for manual conflict resolution)
130
+ if (line.toLowerCase().includes('complete') && line.toLowerCase().includes('merge')) {
131
+ try {
132
+ const { execSync } = await Promise.resolve().then(() => __importStar(require('child_process')));
133
+ execSync('git add -A', { encoding: 'utf-8', stdio: 'pipe' });
134
+ execSync('git commit --no-edit', { encoding: 'utf-8', stdio: 'pipe' });
135
+ console.log(chalk_1.default.green('\nāœ“ Merge completed successfully!\n'));
136
+ }
137
+ catch (error) {
138
+ console.log(chalk_1.default.red(`\nāŒ Failed to complete merge: ${error.message}\n`));
139
+ console.log(chalk_1.default.yellow('Make sure all conflicts are resolved and files are saved.\n'));
140
+ }
141
+ rl.prompt();
142
+ return;
143
+ }
129
144
  // Login command (NEW!)
130
145
  if (line === 'login' || line === 'log in') {
131
146
  console.log(chalk_1.default.yellow('\nāš ļø Please exit snap first (type: ') + chalk_1.default.cyan('exit') + chalk_1.default.yellow(')'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapcommit/cli",
3
- "version": "3.9.6",
3
+ "version": "3.9.8",
4
4
  "description": "Instant AI commits. Beautiful progress tracking. Never write commit messages again.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {