@snapcommit/cli 3.9.9 → 3.9.10

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.
@@ -679,13 +679,26 @@ async function executeGitCommands(commands) {
679
679
  }
680
680
  }
681
681
  catch (error) {
682
- const errorMsg = error.message?.toLowerCase() || '';
683
- // Special handling for merge conflicts (check for ANY merge conflict indicators)
684
- if (cmd.includes('git merge') && (errorMsg.includes('conflict') ||
685
- errorMsg.includes('both added') ||
686
- errorMsg.includes('both modified') ||
687
- errorMsg.includes('unmerged paths') ||
688
- errorMsg.includes('automatic merge failed'))) {
682
+ // Capture both message and stderr for comprehensive error checking
683
+ const errorMsg = (error.message?.toLowerCase() || '') + ' ' + (error.stderr?.toString().toLowerCase() || '');
684
+ // Special handling for merge conflicts (check for ANY merge conflict indicators OR conflicted files exist)
685
+ let hasConflicts = false;
686
+ if (cmd.includes('git merge')) {
687
+ // Check if there are actually conflicted files
688
+ try {
689
+ const conflictedFiles = (0, child_process_1.execSync)('git diff --name-only --diff-filter=U', { encoding: 'utf-8', stdio: 'pipe' }).trim();
690
+ hasConflicts = conflictedFiles.length > 0;
691
+ }
692
+ catch {
693
+ // If command fails, check error message
694
+ hasConflicts = errorMsg.includes('conflict') ||
695
+ errorMsg.includes('both added') ||
696
+ errorMsg.includes('both modified') ||
697
+ errorMsg.includes('unmerged paths') ||
698
+ errorMsg.includes('automatic merge failed');
699
+ }
700
+ }
701
+ if (hasConflicts) {
689
702
  console.log(chalk_1.default.yellow('\n⚠️ Merge conflicts detected!\n'));
690
703
  // Try AI auto-resolution first
691
704
  console.log(chalk_1.default.blue('🤖 Attempting AI conflict resolution...\n'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapcommit/cli",
3
- "version": "3.9.9",
3
+ "version": "3.9.10",
4
4
  "description": "Instant AI commits. Beautiful progress tracking. Never write commit messages again.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {