feat(FN-2387): unify agents view loading through useAgents
- Move AgentsView to consume agents, loading state, and reload logic directly from useAgents - Extend useAgents with filterState/showSystemAgents options and always pass includeEphemeral in fetch filters - Remove duplicate initial fetch/SSE path in AgentsView and rely on hook-managed refresh behavior - Add regression coverage for single initial load and system-agent visibility toggling behavior - Update useAgents hook tests to assert the new includeEphemeral fetch contract
This commit is contained in:
@@ -2,7 +2,10 @@ import { defineConfig } from "vitest/config";
|
||||
import { resolve } from "node:path";
|
||||
import { cpus } from "node:os";
|
||||
|
||||
const defaultMaxWorkers = Math.max(1, cpus().length - 1);
|
||||
// Keep worker fan-out conservative by default. Over-subscribing threads can
|
||||
// starve Vitest's worker RPC channel and trigger flaky "onTaskUpdate" timeouts
|
||||
// under heavy SQLite test load.
|
||||
const defaultMaxWorkers = Math.min(4, Math.max(1, cpus().length - 1));
|
||||
const requestedMaxWorkers = Number.parseInt(process.env.VITEST_MAX_WORKERS ?? String(defaultMaxWorkers), 10);
|
||||
const maxWorkers = Math.max(1, Number.isFinite(requestedMaxWorkers) ? requestedMaxWorkers : defaultMaxWorkers);
|
||||
process.env.VITEST_MAX_WORKERS = String(maxWorkers);
|
||||
|
||||
Reference in New Issue
Block a user