@snapcommit/cli 3.9.3 → 3.9.4

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.
@@ -396,6 +396,19 @@ async function executeCommitWithAI(intent) {
396
396
  }
397
397
  catch (pushError) {
398
398
  const errorMsg = pushError.message.toLowerCase();
399
+ // Auto-fix: No upstream branch - set it automatically!
400
+ if (errorMsg.includes('no upstream') || errorMsg.includes('has no upstream branch')) {
401
+ console.log(chalk_1.default.blue('⚡ Setting upstream branch...'));
402
+ try {
403
+ const currentBranch = (0, child_process_1.execSync)('git rev-parse --abbrev-ref HEAD', { encoding: 'utf-8' }).trim();
404
+ (0, child_process_1.execSync)(`git push --set-upstream origin ${currentBranch}`, { encoding: 'utf-8', stdio: 'pipe' });
405
+ console.log(chalk_1.default.green('✓ Pushed and set upstream\n'));
406
+ }
407
+ catch (upstreamError) {
408
+ console.log(chalk_1.default.red(`\n❌ Failed to set upstream: ${upstreamError.message}\n`));
409
+ }
410
+ return;
411
+ }
399
412
  if (errorMsg.includes('no configured push destination')) {
400
413
  console.log(chalk_1.default.gray('✓ Committed locally (no remote)\n'));
401
414
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapcommit/cli",
3
- "version": "3.9.3",
3
+ "version": "3.9.4",
4
4
  "description": "Instant AI commits. Beautiful progress tracking. Never write commit messages again.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {