From 0bdba54ba24a14e7dc2cfab64084452756bccce7 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Mon, 22 Dec 2025 16:59:04 +0200 Subject: feat: Add user settings to disable auto tagging/summarization (#2275) * feat: Add per-user settings to disable auto-tagging and auto-summarization This commit adds user-level controls for AI features when they are enabled on the server. Users can now toggle auto-tagging and auto-summarization on/off from the AI Settings page. Changes: - Added autoTaggingEnabled and autoSummarizationEnabled fields to user table - Updated user settings schemas and API endpoints to handle new fields - Modified inference workers to check user preferences before processing - Added toggle switches to AI Settings page (only visible when server has features enabled) - Generated database migration for new fields - Exposed enableAutoTagging and enableAutoSummarization in client config The settings default to null (use server default). When explicitly set to false, the user's bookmarks will skip the respective AI processing. * revert migration * i18n --------- Co-authored-by: Claude --- packages/trpc/models/users.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/trpc/models') diff --git a/packages/trpc/models/users.ts b/packages/trpc/models/users.ts index 85aed639..4c7272b1 100644 --- a/packages/trpc/models/users.ts +++ b/packages/trpc/models/users.ts @@ -436,6 +436,8 @@ export class User { readerFontSize: true, readerLineHeight: true, readerFontFamily: true, + autoTaggingEnabled: true, + autoSummarizationEnabled: true, }, }); @@ -456,6 +458,8 @@ export class User { readerFontSize: settings.readerFontSize, readerLineHeight: settings.readerLineHeight, readerFontFamily: settings.readerFontFamily, + autoTaggingEnabled: settings.autoTaggingEnabled, + autoSummarizationEnabled: settings.autoSummarizationEnabled, }; } @@ -481,6 +485,8 @@ export class User { readerFontSize: input.readerFontSize, readerLineHeight: input.readerLineHeight, readerFontFamily: input.readerFontFamily, + autoTaggingEnabled: input.autoTaggingEnabled, + autoSummarizationEnabled: input.autoSummarizationEnabled, }) .where(eq(users.id, this.user.id)); } -- cgit v1.2.3-70-g09d2