claude-issue-solver 1.20.0 โ†’ 1.21.0

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.
@@ -245,29 +245,32 @@ async function cleanAllCommand() {
245
245
  })));
246
246
  statusSpinner.stop();
247
247
  console.log(chalk_1.default.bold('\n๐Ÿงน Found issue worktrees:\n'));
248
- for (const wt of worktreesWithStatus) {
248
+ // Build choices for checkbox prompt
249
+ const choices = worktreesWithStatus.map((wt) => {
249
250
  const status = getStatusLabel(wt);
250
- console.log(` ${chalk_1.default.cyan(`#${wt.issueNumber}`)}\t${status}`);
251
- if (wt.branch) {
252
- console.log(chalk_1.default.dim(` \t${wt.branch}`));
253
- }
254
- console.log(chalk_1.default.dim(` \t${wt.path}`));
255
- console.log();
256
- }
257
- const { confirm } = await inquirer_1.default.prompt([
251
+ const isMerged = wt.prStatus?.state === 'merged';
252
+ return {
253
+ name: `#${wt.issueNumber}\t${status}`,
254
+ value: wt.issueNumber,
255
+ checked: isMerged, // Pre-select merged PRs
256
+ };
257
+ });
258
+ const { selected } = await inquirer_1.default.prompt([
258
259
  {
259
- type: 'confirm',
260
- name: 'confirm',
261
- message: `Remove all ${worktrees.length} worktree(s) and delete branches?`,
262
- default: false,
260
+ type: 'checkbox',
261
+ name: 'selected',
262
+ message: 'Select worktrees to clean (space to toggle, enter to confirm):',
263
+ choices,
263
264
  },
264
265
  ]);
265
- if (!confirm) {
266
- console.log(chalk_1.default.dim('Cancelled.'));
266
+ if (selected.length === 0) {
267
+ console.log(chalk_1.default.dim('No worktrees selected.'));
267
268
  return;
268
269
  }
270
+ // Filter to only selected worktrees
271
+ const selectedWorktrees = worktrees.filter((wt) => selected.includes(wt.issueNumber));
269
272
  console.log();
270
- for (const wt of worktrees) {
273
+ for (const wt of selectedWorktrees) {
271
274
  const spinner = (0, ora_1.default)(`Cleaning issue #${wt.issueNumber}...`).start();
272
275
  try {
273
276
  // Close terminal and VS Code windows for this worktree
@@ -349,7 +352,7 @@ async function cleanAllCommand() {
349
352
  // Prune stale worktrees
350
353
  (0, child_process_1.execSync)('git worktree prune', { cwd: projectRoot, stdio: 'pipe' });
351
354
  console.log();
352
- console.log(chalk_1.default.green(`โœ… Cleaned up ${worktrees.length} issue worktree(s)!`));
355
+ console.log(chalk_1.default.green(`โœ… Cleaned up ${selectedWorktrees.length} issue worktree(s)!`));
353
356
  }
354
357
  async function cleanCommand(issueNumber) {
355
358
  const projectRoot = (0, git_1.getProjectRoot)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-issue-solver",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "Automatically solve GitHub issues using Claude Code",
5
5
  "main": "dist/index.js",
6
6
  "bin": {