@snapcommit/cli 3.11.3 → 3.11.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.
@@ -207,6 +207,41 @@ async function tryQuickCommands(input, context) {
207
207
  return true;
208
208
  }
209
209
  }
210
+ // Stage commands
211
+ if (lower.startsWith('stage')) {
212
+ const rest = input.replace(/^stage\s*/i, '').trim();
213
+ const ALL_KEYWORDS = ['all', 'all changes', 'everything', 'everything please', 'it all', 'them all'];
214
+ try {
215
+ if (!rest || ALL_KEYWORDS.includes(rest.toLowerCase())) {
216
+ (0, child_process_1.execSync)('git add -A', { stdio: 'ignore' });
217
+ console.log(chalk_1.default.green('\n✓ Staged all changes\n'));
218
+ }
219
+ else {
220
+ const files = rest
221
+ .replace(/\sand\s/gi, ',')
222
+ .split(',')
223
+ .map((segment) => segment
224
+ .replace(/^(the|file|files)\s+/i, '')
225
+ .replace(/\s+please$/i, '')
226
+ .trim())
227
+ .filter(Boolean);
228
+ if (files.length === 0) {
229
+ console.log(chalk_1.default.yellow('\n⚠️ No files specified to stage.\n'));
230
+ return true;
231
+ }
232
+ files.forEach((file) => {
233
+ const escaped = file.replace(/(["\\$`])/g, '\\$1');
234
+ (0, child_process_1.execSync)(`git add -- "${escaped}"`, { stdio: 'ignore' });
235
+ });
236
+ console.log(chalk_1.default.green(`\n✓ Staged ${files.length} ${files.length === 1 ? 'file' : 'files'}: ${files.join(', ')}\n`));
237
+ }
238
+ }
239
+ catch (error) {
240
+ console.log(chalk_1.default.red(`\n❌ Failed to stage changes: ${error.message}\n`));
241
+ }
242
+ context.lastAction = 'stage';
243
+ return true;
244
+ }
210
245
  // Status commands
211
246
  if (lower === 'status' || lower === 'show status' || lower === 'what changed') {
212
247
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapcommit/cli",
3
- "version": "3.11.3",
3
+ "version": "3.11.4",
4
4
  "description": "Instant AI commits. Beautiful progress tracking. Never write commit messages again.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {