feat(HAI-002): add maxWorktrees setting to limit total git worktrees
- Add maxWorktrees field to Settings interface with default of 4 - Enforce worktree limit in Scheduler.schedule() alongside maxConcurrent - Wire setting through dashboard startup from persisted settings - Include maxWorktrees in /api/config response - Add Max Worktrees input to Settings Modal UI - Backward compatible: existing configs without maxWorktrees use default
This commit is contained in:
@@ -49,8 +49,11 @@ export async function runDashboard(port: number, opts: { engine?: boolean; open?
|
||||
onError: (t, e) => console.log(`[engine] ✗ ${t.id}: ${e.message}`),
|
||||
});
|
||||
|
||||
const settings = await store.getSettings();
|
||||
|
||||
const scheduler = new Scheduler(store, {
|
||||
maxConcurrent: 2,
|
||||
maxConcurrent: settings.maxConcurrent,
|
||||
maxWorktrees: settings.maxWorktrees,
|
||||
onSchedule: (t) => console.log(`[engine] Scheduled ${t.id}`),
|
||||
onBlocked: (t, deps) => console.log(`[engine] ${t.id} blocked by ${deps.join(", ")}`),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user