feat(documents): add the AI-settings toggle to read documents automatically

Add a single switch in AI settings — off by default — that turns on ambient AI
reading of uploaded vault documents. Turning it on reveals a once-shown,
vendor-blind honesty confirm (subscription providers may use the content to
improve their models; a self-hosted local model never egresses) that must be
acknowledged before the setting is written. Copy is translated across all six
locales.
This commit is contained in:
Marc-André Bombeck committed 2026-07-09 10:55:01 +02:00
1 parent d2451021bc
commit b3ae35b055
9 files changed
+202 -6

No files matched your search

+6
View File
@@ -76,4 +76,10 @@ export const documentKeys = {
*/
inboundDocumentChat: (documentId: string) =>
["documents", "inbound", documentId, "chat"] as const,
/**
* The per-user "read documents automatically with AI" opt-in
* (`GET/PATCH /api/auth/me/documents-auto-ai-read`). Drives the AI-settings
* toggle; a flip invalidates the document AI capability probe.
*/
documentsAutoAiRead: () => ["documents", "auto-ai-read"] as const,
};