migrate to root dir

This commit is contained in:
2025-08-08 19:26:21 +02:00
parent cf8219691b
commit 8720500442
41 changed files with 2478 additions and 4440 deletions

11
lib/pipeline/chunker.ts Normal file
View File

@@ -0,0 +1,11 @@
export function chunkText(text: string, chunkSize: number): string[] {
const words = text.split(/\s+/);
const chunks: string[] = [];
for (let i = 0; i < words.length; i += chunkSize) {
const chunk = words.slice(i, i + chunkSize).join(" ");
chunks.push(chunk);
}
return chunks;
}