This merge delivers the full draft planning feature (FN-3106) — API routes for planning subtasks, the AiSessionStore backend for draft sessions, a draft planning API client, auto-creation of planning drafts from user input, and corresponding UI polish in PlanningModeModal with accessibility-focused Fusion-Task-Id: FN-3106
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
import { defineConfig } from "vitest/config";
|
|
import { cpus } from "node:os";
|
|
import { resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
// Cap fan-out to 4 to avoid saturating high-core machines under workspace concurrency.
|
|
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);
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"@fusion/core": fileURLToPath(new URL("../core/src/index.ts", import.meta.url)),
|
|
},
|
|
},
|
|
test: {
|
|
include: ["src/**/*.test.ts"],
|
|
setupFiles: [resolve(__dirname, "../core/src/__test-utils__/vitest-setup.ts")],
|
|
globalSetup: [resolve(__dirname, "../core/src/__test-utils__/vitest-teardown.ts")],
|
|
pool: "threads",
|
|
maxWorkers,
|
|
poolOptions: { threads: { minThreads: 1, maxThreads: maxWorkers } },
|
|
},
|
|
});
|