@snapcommit/cli 3.8.9 → 3.8.11

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.
@@ -321,20 +321,38 @@ async function executeCommitWithAI(intent) {
321
321
  // Try to auto-resolve conflicts
322
322
  const resolved = await tryAdvancedConflictResolution();
323
323
  if (resolved) {
324
- console.log(chalk_1.default.green('✓ Conflicts resolved'));
324
+ console.log(chalk_1.default.green('✓ Conflicts resolved automatically!\n'));
325
325
  }
326
326
  else {
327
- console.log(chalk_1.default.red('\n❌ Cannot auto-resolve conflicts'));
328
- console.log(chalk_1.default.white('\nConflicted files:'));
327
+ // Better messaging for manual resolution
328
+ console.log(chalk_1.default.yellow('\n⚠️ AI could not auto-resolve these conflicts\n'));
329
+ console.log(chalk_1.default.white('Why? These conflicts require human judgment:'));
330
+ console.log(chalk_1.default.gray(' • Business logic decisions (which approach is correct?)'));
331
+ console.log(chalk_1.default.gray(' • Architectural changes (incompatible design choices)'));
332
+ console.log(chalk_1.default.gray(' • Semantic conflicts (both valid, but different intent)\n'));
333
+ console.log(chalk_1.default.white('Conflicted files:'));
329
334
  const conflicts = (0, child_process_1.execSync)('git diff --name-only --diff-filter=U', { encoding: 'utf-8' });
330
335
  conflicts.split('\n').filter(f => f.trim()).forEach(file => {
331
336
  console.log(chalk_1.default.red(` ✗ ${file}`));
332
337
  });
333
- console.log(chalk_1.default.cyan('\nTo resolve manually:'));
334
- console.log(chalk_1.default.gray(' 1. Fix conflicts in the files above'));
335
- console.log(chalk_1.default.gray(' 2. Run: ') + chalk_1.default.cyan('git add <files>'));
336
- console.log(chalk_1.default.gray(' 3. Run: ') + chalk_1.default.cyan('git rebase --continue'));
337
- console.log(chalk_1.default.gray(' 4. Then try: ') + chalk_1.default.cyan('snap') + chalk_1.default.gray(' and ') + chalk_1.default.cyan('push changes\n'));
338
+ console.log(chalk_1.default.cyan('\n📖 How to resolve manually:\n'));
339
+ console.log(chalk_1.default.white(' 1. Open each file above in your editor'));
340
+ console.log(chalk_1.default.gray(' Look for conflict markers: ') + chalk_1.default.yellow('<<<<<<< HEAD'));
341
+ console.log(chalk_1.default.gray(' ') + chalk_1.default.yellow('======='));
342
+ console.log(chalk_1.default.gray(' ') + chalk_1.default.yellow('>>>>>>> branch'));
343
+ console.log('');
344
+ console.log(chalk_1.default.white(' 2. Choose which code to keep (or merge both)'));
345
+ console.log(chalk_1.default.gray(' Remove the conflict markers when done'));
346
+ console.log('');
347
+ console.log(chalk_1.default.white(' 3. After fixing, stage the resolved files:'));
348
+ console.log(chalk_1.default.cyan(' git add <files>'));
349
+ console.log('');
350
+ console.log(chalk_1.default.white(' 4. Continue the rebase:'));
351
+ console.log(chalk_1.default.cyan(' git rebase --continue'));
352
+ console.log('');
353
+ console.log(chalk_1.default.white(' 5. Then push your changes:'));
354
+ console.log(chalk_1.default.cyan(' snap') + chalk_1.default.gray(' and type ') + chalk_1.default.cyan('push changes\n'));
355
+ console.log(chalk_1.default.gray('💡 Tip: Most conflicts are simple! Just pick the better code.\n'));
338
356
  return;
339
357
  }
340
358
  }
@@ -591,7 +609,7 @@ async function executeGitCommands(commands) {
591
609
  async function executeGitHubCommand(intent) {
592
610
  if (!(0, github_connect_1.isGitHubConnected)()) {
593
611
  console.log(chalk_1.default.yellow('\n⚠️ GitHub not connected'));
594
- console.log(chalk_1.default.gray(' Run: ') + chalk_1.default.cyan('snap github connect\n'));
612
+ console.log(chalk_1.default.gray(' Run: ') + chalk_1.default.cyan('github connect') + chalk_1.default.gray(' (you\'re already in snap!)\n'));
595
613
  return;
596
614
  }
597
615
  try {
package/dist/lib/auth.js CHANGED
@@ -140,7 +140,7 @@ async function promptAuth() {
140
140
  console.log(chalk_1.default.yellow('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
141
141
  console.log(chalk_1.default.bold('💡 Want GitHub features too?\n'));
142
142
  console.log(chalk_1.default.gray(' Create PRs, check CI, and more with natural language!'));
143
- console.log(chalk_1.default.gray(' Run: ') + chalk_1.default.cyan('snap github connect'));
143
+ console.log(chalk_1.default.gray(' Run: ') + chalk_1.default.cyan('github connect') + chalk_1.default.gray(' (inside snap)'));
144
144
  console.log(chalk_1.default.gray(' (You\'ll need a GitHub Personal Access Token - Classic)\n'));
145
145
  console.log(chalk_1.default.gray(' Get one at: ') + chalk_1.default.cyan('https://github.com/settings/tokens'));
146
146
  console.log(chalk_1.default.gray(' Scopes needed: ') + chalk_1.default.white('repo, workflow, read:user'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapcommit/cli",
3
- "version": "3.8.9",
3
+ "version": "3.8.11",
4
4
  "description": "Instant AI commits. Beautiful progress tracking. Never write commit messages again.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {