multi-agents-cli 1.1.22 → 1.1.24
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/core/workflow/agent.js +2 -0
- package/core/workflow/guards.js +11 -0
- package/package.json +1 -1
package/core/workflow/agent.js
CHANGED
|
@@ -1163,6 +1163,8 @@ const main = async () => {
|
|
|
1163
1163
|
separator();
|
|
1164
1164
|
console.log(`\n ${bold('Abandoning...')}\n`);
|
|
1165
1165
|
const { branch } = activeSlot;
|
|
1166
|
+
const abandonPath = path.isAbsolute(activeSlot.worktreePath) ? activeSlot.worktreePath : path.resolve(ROOT, activeSlot.worktreePath);
|
|
1167
|
+
try { execSync(`git worktree remove "${abandonPath}" --force`, { cwd: ROOT, stdio: 'pipe' }); console.log(` ${green('✓')} Worktree removed`); } catch {}
|
|
1166
1168
|
try { execSync(`git branch -D ${branch}`, { cwd: ROOT, stdio: 'pipe' }); console.log(` ${green('✓')} Local branch deleted`); } catch {}
|
|
1167
1169
|
try { execSync(`git push origin --delete ${branch}`, { cwd: ROOT, stdio: 'pipe' }); console.log(` ${green('✓')} Remote branch deleted`); } catch {}
|
|
1168
1170
|
guards.clearTrackingSlot(tracking, project, agent, ROOT);
|
package/core/workflow/guards.js
CHANGED
|
@@ -476,6 +476,17 @@ const runMissingGate = async (params) => {
|
|
|
476
476
|
separator();
|
|
477
477
|
console.log(`\n${bold('Resetting...')}\n`);
|
|
478
478
|
|
|
479
|
+
// Remove worktree folder if it exists
|
|
480
|
+
if (slot.worktreePath) {
|
|
481
|
+
const absoluteWorktreePath = path.isAbsolute(slot.worktreePath) ? slot.worktreePath : path.resolve(ROOT, slot.worktreePath);
|
|
482
|
+
try {
|
|
483
|
+
execSync(`git worktree remove "${absoluteWorktreePath}" --force`, { cwd: ROOT, stdio: 'pipe' });
|
|
484
|
+
console.log(` ${green('✓')} Worktree removed`);
|
|
485
|
+
} catch {
|
|
486
|
+
console.log(` ${dim('!')} Worktree folder not found - skipping`);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
479
490
|
// Delete local branch
|
|
480
491
|
try {
|
|
481
492
|
execSync(`git branch -D ${branch}`, { cwd: ROOT, stdio: 'pipe' });
|
package/package.json
CHANGED