feat(ai): pre-warm the vector namespace

This commit is contained in:
Philipinho
2026-08-17 20:09:53 +01:00
parent 8c4ecfaaf2
commit 7b8ade0968
7 changed files with 32 additions and 10 deletions
@@ -15,6 +15,14 @@ export interface IAiSearchResponse {
}>;
}
export async function hintVectorCache(): Promise<void> {
try {
await api.post("/ai/vector-cache-hint");
} catch {
// best-effort cache hint
}
}
export async function aiAnswers(
params: IPageSearchParams,
onChunk?: (chunk: { content?: string; sources?: any[] }) => void,