From 2743d9e38ecfdbf757d4d2f97bcf09d601245b59 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sun, 18 May 2025 20:22:59 +0000
Subject: feat: Add AI auto summarization. Fixes #1163

---
 apps/web/components/admin/BackgroundJobs.tsx | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

(limited to 'apps/web/components/admin/BackgroundJobs.tsx')

diff --git a/apps/web/components/admin/BackgroundJobs.tsx b/apps/web/components/admin/BackgroundJobs.tsx
index 217e2ad9..ac5885ef 100644
--- a/apps/web/components/admin/BackgroundJobs.tsx
+++ b/apps/web/components/admin/BackgroundJobs.tsx
@@ -127,7 +127,7 @@ function AdminActions() {
         variant="destructive"
         loading={isInferencePending}
         onClick={() =>
-          reRunInferenceOnAllBookmarks({ taggingStatus: "failure" })
+          reRunInferenceOnAllBookmarks({ type: "tag", status: "failure" })
         }
       >
         {t("admin.actions.regenerate_ai_tags_for_failed_bookmarks_only")}
@@ -135,10 +135,30 @@ function AdminActions() {
       <ActionButton
         variant="destructive"
         loading={isInferencePending}
-        onClick={() => reRunInferenceOnAllBookmarks({ taggingStatus: "all" })}
+        onClick={() =>
+          reRunInferenceOnAllBookmarks({ type: "tag", status: "all" })
+        }
       >
         {t("admin.actions.regenerate_ai_tags_for_all_bookmarks")}
       </ActionButton>
+      <ActionButton
+        variant="destructive"
+        loading={isInferencePending}
+        onClick={() =>
+          reRunInferenceOnAllBookmarks({ type: "summarize", status: "failure" })
+        }
+      >
+        {t("admin.actions.regenerate_ai_summaries_for_failed_bookmarks_only")}
+      </ActionButton>
+      <ActionButton
+        variant="destructive"
+        loading={isInferencePending}
+        onClick={() =>
+          reRunInferenceOnAllBookmarks({ type: "summarize", status: "all" })
+        }
+      >
+        {t("admin.actions.regenerate_ai_summaries_for_all_bookmarks")}
+      </ActionButton>
       <ActionButton
         variant="destructive"
         loading={isReindexPending}
-- 
cgit v1.2.3-70-g09d2

