claude-issue-solver 1.26.0 ā 1.26.1
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/dist/commands/clean.js +11 -8
- package/package.json +1 -1
package/dist/commands/clean.js
CHANGED
|
@@ -527,10 +527,12 @@ async function cleanMergedCommand() {
|
|
|
527
527
|
prStatus: wt.branch ? await (0, github_1.getPRForBranchAsync)(wt.branch) : null,
|
|
528
528
|
})));
|
|
529
529
|
statusSpinner.stop();
|
|
530
|
-
// Filter to
|
|
530
|
+
// Filter to merged PRs and orphaned folders
|
|
531
531
|
const mergedWorktrees = worktreesWithStatus.filter((wt) => wt.prStatus?.state === 'merged');
|
|
532
|
-
|
|
533
|
-
|
|
532
|
+
const orphanedWorktrees = worktreesWithStatus.filter((wt) => !wt.branch);
|
|
533
|
+
const toClean = [...mergedWorktrees, ...orphanedWorktrees];
|
|
534
|
+
if (toClean.length === 0) {
|
|
535
|
+
console.log(chalk_1.default.yellow('\nNo worktrees with merged PRs or orphaned folders found.'));
|
|
534
536
|
// Show what's available
|
|
535
537
|
if (worktreesWithStatus.length > 0) {
|
|
536
538
|
console.log(chalk_1.default.dim('\nExisting worktrees:'));
|
|
@@ -541,15 +543,16 @@ async function cleanMergedCommand() {
|
|
|
541
543
|
}
|
|
542
544
|
return;
|
|
543
545
|
}
|
|
544
|
-
console.log(chalk_1.default.bold(`\nš§¹ Cleaning ${
|
|
545
|
-
for (const wt of
|
|
546
|
-
|
|
546
|
+
console.log(chalk_1.default.bold(`\nš§¹ Cleaning ${toClean.length} worktree(s):\n`));
|
|
547
|
+
for (const wt of toClean) {
|
|
548
|
+
const status = getStatusLabel(wt);
|
|
549
|
+
console.log(` ${chalk_1.default.cyan(`#${wt.issueNumber}`)}\t${status}`);
|
|
547
550
|
if (wt.branch) {
|
|
548
551
|
console.log(chalk_1.default.dim(` \t${wt.branch}`));
|
|
549
552
|
}
|
|
550
553
|
}
|
|
551
554
|
console.log();
|
|
552
|
-
for (const wt of
|
|
555
|
+
for (const wt of toClean) {
|
|
553
556
|
const spinner = (0, ora_1.default)(`Cleaning issue #${wt.issueNumber}...`).start();
|
|
554
557
|
try {
|
|
555
558
|
// Close terminal and VS Code windows for this worktree
|
|
@@ -632,5 +635,5 @@ async function cleanMergedCommand() {
|
|
|
632
635
|
// May fail if current directory was deleted
|
|
633
636
|
}
|
|
634
637
|
console.log();
|
|
635
|
-
console.log(chalk_1.default.green(`ā
Cleaned up ${
|
|
638
|
+
console.log(chalk_1.default.green(`ā
Cleaned up ${toClean.length} worktree(s)!`));
|
|
636
639
|
}
|