A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix: Fix slice call in the content truncation logic which was resulting in excessive usage of context tokens. Fixes #94
MohamedBassem4629dac81cb6
diff --git a/apps/workers/utils.ts b/apps/workers/utils.tsindex 8e69dcd2..2372684e 100644--- a/apps/workers/utils.ts+++ b/apps/workers/utils.ts@@ -40,7 +40,7 @@ export async function readPDFText(buffer: Buffer): Promise<{export function truncateContent(content: string, length = 1500) {let words = content.split(" ");if (words.length > length) {- words = words.slice(length);+ words = words.slice(0, length);content = words.join(" ");}return content;