Some checks are pending
CI / detect-changes (push) Waiting to run
CI / docs-check (push) Blocked by required conditions
CI / lint (push) Blocked by required conditions
CI / build (push) Blocked by required conditions
CI / integration-tests (push) Blocked by required conditions
CI / windows-portability (push) Blocked by required conditions
CI / rtk-portability (linux, blacksmith-4vcpu-ubuntu-2404) (push) Blocked by required conditions
CI / rtk-portability (macos, macos-15) (push) Blocked by required conditions
CI / rtk-portability (windows, blacksmith-4vcpu-windows-2025) (push) Blocked by required conditions
Vector retriever was disabled everywhere because it appeared to hang. It was actually doing a first-time embedding index build for 57K files, which takes ~60-90 min. Re-enable vector by increasing timeouts and letting scope-aware retriever selection decide when vector is safe. Changes: - sift_search: retriever timeout 30s->300s, total 60s->600s - codebase_search: total timeout 120s->600s - warmup: retriever timeout 30s->300s, hard timeout 600s->3600s - codebase_search now uses chooseSiftRetrievers() instead of hardcoded bm25+phrase: repo-root -> bm25+phrase (fast), scoped subdirs -> vector - Comments updated to reflect "slow first build" not "hang" Tests: 178 files / 1845 tests, all pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
26 lines
929 B
TypeScript
26 lines
929 B
TypeScript
import type { NextApiRequest, NextApiResponse } from "next";
|
|
import { readdirSync, statSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
|
|
// Returns a list of subfolders in the dev root that contain a .sf directory
|
|
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
|
const devRoot = req.query.devRoot as string;
|
|
if (!devRoot) return res.status(400).json({ error: "Missing devRoot" });
|
|
let projects: string[] = [];
|
|
try {
|
|
const entries = readdirSync(devRoot, { withFileTypes: true });
|
|
projects = entries
|
|
.filter((entry) => entry.isDirectory())
|
|
.filter((entry) => {
|
|
try {
|
|
return statSync(join(devRoot, entry.name, ".sf")).isDirectory();
|
|
} catch {
|
|
return false;
|
|
}
|
|
})
|
|
.map((entry) => entry.name);
|
|
res.status(200).json({ projects });
|
|
} catch (e) {
|
|
res.status(500).json({ error: (e as Error).message });
|
|
}
|
|
}
|