claude-issue-solver 1.19.4 โ†’ 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.
package/README.md CHANGED
@@ -159,6 +159,8 @@ claude-issue --help
159
159
 
160
160
  **`list` command:**
161
161
  - `--verbose` - Show issue descriptions
162
+ - `-n, --limit <number>` - Maximum issues to show (default: 50)
163
+ - `--all` - Show all issues (no limit)
162
164
 
163
165
  **`new` command:**
164
166
  - `-b, --body <text>` - Issue description
@@ -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)();
@@ -1,3 +1,5 @@
1
1
  export declare function listCommand(options?: {
2
2
  verbose?: boolean;
3
+ limit?: number;
4
+ all?: boolean;
3
5
  }): Promise<void>;
@@ -60,11 +60,17 @@ function formatBody(body, indent, termWidth) {
60
60
  async function listCommand(options = {}) {
61
61
  const projectName = (0, git_1.getProjectName)();
62
62
  console.log(chalk_1.default.bold(`\nOpen issues for ${projectName}:\n`));
63
- const issues = (0, github_1.listIssues)();
63
+ const limit = options.all ? 0 : (options.limit ?? 50);
64
+ const issues = (0, github_1.listIssues)(limit);
64
65
  if (issues.length === 0) {
65
66
  console.log(chalk_1.default.yellow('No open issues found.'));
66
67
  return;
67
68
  }
69
+ // Show hint if we hit the limit and user didn't explicitly set options
70
+ const hitLimit = !options.all && !options.limit && issues.length === limit;
71
+ if (hitLimit) {
72
+ console.log(chalk_1.default.dim(` Showing first ${limit} issues. Use --limit <n> or --all to see more.\n`));
73
+ }
68
74
  const issuesWithPRs = (0, github_1.getIssuesWithOpenPRs)();
69
75
  for (const issue of issues) {
70
76
  const prTag = issuesWithPRs.has(issue.number) ? chalk_1.default.magenta(' [PR]') : '';
package/dist/index.js CHANGED
@@ -68,6 +68,8 @@ program
68
68
  .alias('ls')
69
69
  .description('List open issues')
70
70
  .option('--verbose', 'Show issue descriptions')
71
+ .option('-n, --limit <number>', 'Maximum number of issues to show', (val) => parseInt(val, 10))
72
+ .option('--all', 'Show all issues (no limit)')
71
73
  .action((options) => (0, list_1.listCommand)(options));
72
74
  // Show command
73
75
  program
@@ -50,9 +50,10 @@ function getIssue(issueNumber) {
50
50
  return null;
51
51
  }
52
52
  }
53
- function listIssues(limit = 20) {
53
+ function listIssues(limit = 50) {
54
54
  try {
55
- const output = (0, child_process_1.execSync)(`gh issue list --state open --limit ${limit} --json number,title,body,labels`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
55
+ const limitArg = limit > 0 ? `--limit ${limit}` : '';
56
+ const output = (0, child_process_1.execSync)(`gh issue list --state open ${limitArg} --json number,title,body,labels`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
56
57
  return JSON.parse(output);
57
58
  }
58
59
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-issue-solver",
3
- "version": "1.19.4",
3
+ "version": "1.21.0",
4
4
  "description": "Automatically solve GitHub issues using Claude Code",
5
5
  "main": "dist/index.js",
6
6
  "bin": {