chore(gate): fix lint and formatting

This commit is contained in:
Peter Steinberger
2026-01-18 06:01:09 +00:00
parent d1c85cb32d
commit d4bd387e0e
15 changed files with 244 additions and 231 deletions

View File

@@ -21,9 +21,13 @@ export type HybridKeywordResult = {
};
export function buildFtsQuery(raw: string): string | null {
const tokens = raw.match(/[A-Za-z0-9_]+/g)?.map((t) => t.trim()).filter(Boolean) ?? [];
const tokens =
raw
.match(/[A-Za-z0-9_]+/g)
?.map((t) => t.trim())
.filter(Boolean) ?? [];
if (tokens.length === 0) return null;
const quoted = tokens.map((t) => `"${t.replaceAll("\"", "")}"`);
const quoted = tokens.map((t) => `"${t.replaceAll('"', "")}"`);
return quoted.join(" AND ");
}
@@ -105,4 +109,3 @@ export function mergeHybridResults(params: {
return merged.sort((a, b) => b.score - a.score);
}