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.
- package/dist/commands/clean.js +20 -17
- package/package.json +1 -1
package/dist/commands/clean.js
CHANGED
|
@@ -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
|
-
|
|
248
|
+
// Build choices for checkbox prompt
|
|
249
|
+
const choices = worktreesWithStatus.map((wt) => {
|
|
249
250
|
const status = getStatusLabel(wt);
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
const {
|
|
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: '
|
|
260
|
-
name: '
|
|
261
|
-
message:
|
|
262
|
-
|
|
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 (
|
|
266
|
-
console.log(chalk_1.default.dim('
|
|
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
|
|
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 ${
|
|
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)();
|