From dee3a4d44ddb1999e7dec383889246e87f202d92 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 6 Jul 2025 21:50:23 +0000 Subject: feat: Store large html content in the asset db --- apps/web/lib/attachments.tsx | 10 +- apps/workers/workerUtils.ts | 3 + apps/workers/workers/crawlerWorker.ts | 109 +- apps/workers/workers/inference/summarize.ts | 12 +- apps/workers/workers/inference/tagging.ts | 11 +- apps/workers/workers/searchWorker.ts | 9 +- packages/db/drizzle/0055_content_asset_id.sql | 2 + packages/db/drizzle/meta/0055_snapshot.json | 2051 +++++++++++++++++++++++++ packages/db/drizzle/meta/_journal.json | 7 + packages/db/schema.ts | 4 +- packages/shared/package.json | 2 + packages/shared/types/bookmarks.ts | 2 + packages/shared/utils/htmlUtils.ts | 17 + packages/trpc/lib/attachments.ts | 5 + packages/trpc/models/bookmarks.ts | 80 +- packages/trpc/routers/bookmarks.ts | 21 +- pnpm-lock.yaml | 56 + 17 files changed, 2383 insertions(+), 18 deletions(-) create mode 100644 packages/db/drizzle/0055_content_asset_id.sql create mode 100644 packages/db/drizzle/meta/0055_snapshot.json create mode 100644 packages/shared/utils/htmlUtils.ts diff --git a/apps/web/lib/attachments.tsx b/apps/web/lib/attachments.tsx index 62848d33..ce34b295 100644 --- a/apps/web/lib/attachments.tsx +++ b/apps/web/lib/attachments.tsx @@ -1,4 +1,11 @@ -import { Archive, Camera, Image, Paperclip, Video } from "lucide-react"; +import { + Archive, + Camera, + FileCode, + Image, + Paperclip, + Video, +} from "lucide-react"; import { ZAssetType } from "@karakeep/shared/types/bookmarks"; @@ -10,5 +17,6 @@ export const ASSET_TYPE_TO_ICON: Record = { bannerImage: , video: