mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
Add temporal filtering capabilities for searches by git branch/revision and repository index dates (since/until). Integrates with the refactored QueryIR-based search architecture. - Add gitRevision, since, until parameters to SearchOptions - Implement temporal repo filtering by indexedAt field - Add branch filtering via QueryIR wrapper - Add search_commits MCP tool for commit-based searches - Update list_repos with activeAfter/activeBefore filtering - Add 88 new tests (all passing) Signed-off-by: Wayne Sun <gsun@redhat.com>
21 lines
721 B
TypeScript
21 lines
721 B
TypeScript
import { getRepos } from "@/actions";
|
|
import { serviceErrorResponse } from "@/lib/serviceError";
|
|
import { isServiceError } from "@/lib/utils";
|
|
import { GetReposResponse } from "@/lib/types";
|
|
import { NextRequest } from "next/server";
|
|
|
|
|
|
export const GET = async (request: NextRequest) => {
|
|
const searchParams = request.nextUrl.searchParams;
|
|
const activeAfter = searchParams.get('activeAfter') || undefined;
|
|
const activeBefore = searchParams.get('activeBefore') || undefined;
|
|
|
|
const response: GetReposResponse = await getRepos({
|
|
activeAfter,
|
|
activeBefore,
|
|
});
|
|
if (isServiceError(response)) {
|
|
return serviceErrorResponse(response);
|
|
}
|
|
return Response.json(response);
|
|
}
|