feat(HAI-054): implement pool recycling in aiMergeTask cleanup step
- Release worktree back to pool when recycleWorktrees setting is enabled - Skip worktree removal when released to pool, preserving it for reuse - Fall through to force-remove behavior when pool is unavailable or recycling is disabled
This commit is contained in:
@@ -241,6 +241,9 @@ export async function aiMergeTask(
|
||||
if (otherUser) {
|
||||
console.log(`[merger] Worktree retained — still needed by ${otherUser}`);
|
||||
result.worktreeRemoved = false;
|
||||
} else if (options.pool && (await store.getSettings()).recycleWorktrees) {
|
||||
options.pool.release(worktreePath);
|
||||
result.worktreeRemoved = false;
|
||||
} else {
|
||||
try {
|
||||
execSync(`git worktree remove "${worktreePath}" --force`, {
|
||||
|
||||
Reference in New Issue
Block a user