mirror of
https://github.com/karakeep-app/karakeep.git
synced 2026-02-28 18:25:55 +01:00
* 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 <noreply@anthropic.com>
27 lines
612 B
TypeScript
27 lines
612 B
TypeScript
import { createContext, useContext } from "react";
|
|
|
|
import type { ClientConfig } from "@karakeep/shared/config";
|
|
|
|
export const ClientConfigCtx = createContext<ClientConfig>({
|
|
publicUrl: "",
|
|
publicApiUrl: "",
|
|
demoMode: undefined,
|
|
auth: {
|
|
disableSignups: false,
|
|
disablePasswordAuth: false,
|
|
},
|
|
turnstile: null,
|
|
inference: {
|
|
isConfigured: false,
|
|
inferredTagLang: "english",
|
|
enableAutoTagging: false,
|
|
enableAutoSummarization: false,
|
|
},
|
|
serverVersion: undefined,
|
|
disableNewReleaseCheck: true,
|
|
});
|
|
|
|
export function useClientConfig() {
|
|
return useContext(ClientConfigCtx);
|
|
}
|