Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

feat(settings): add privacy notice banner to AI model settings

tianma-if8cec09760829
diff --git a/apps/web/src/components/settings/AiModelCard.tsx b/apps/web/src/components/settings/AiModelCard.tsx
index 50be8784..3ca9b129 100644
--- a/apps/web/src/components/settings/AiModelCard.tsx
+++ b/apps/web/src/components/settings/AiModelCard.tsx
@@ -1,7 +1,7 @@
import { useState, type FormEvent, type ReactNode } from "react";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import type { AiProvider } from "@edgeever/shared";
-import { ChevronDown, Loader2, Plus, Server, Sparkles, TriangleAlert } from "lucide-react";
+import { ChevronDown, Loader2, Plus, Server, ShieldCheck, Sparkles, TriangleAlert } from "lucide-react";
import { useTranslation } from "react-i18next";
import { AiProviderCard } from "@/components/settings/AiProviderCard";
import {
@@ -228,6 +228,13 @@ export const AiModelCard = () => {
)}
</section>
+ <div className="flex items-start gap-2 border-t border-slate-200/60 pt-3 dark:border-slate-800/60">
+ <ShieldCheck className="mt-0.5 h-3.5 w-3.5 shrink-0 text-emerald-600 dark:text-emerald-400" />
+ <p className="text-xs leading-relaxed text-slate-500 dark:text-slate-400">
+ {t("aiModel.privacyNotice")}
+ </p>
+ </div>
+
<Dialog open={showAdd} onOpenChange={handleAddDialogChange}>
<DialogContent className="max-h-[calc(100vh-2rem)] overflow-y-auto sm:max-w-2xl">
<form className="grid gap-5" onSubmit={(event: FormEvent) => { event.preventDefault(); createMutation.mutate(); }}>
diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.ts
index a86b32dd..25475f1c 100644
--- a/packages/shared/src/i18n/en-US.ts
+++ b/packages/shared/src/i18n/en-US.ts
@@ -716,6 +716,7 @@ export const enUS = {
saved: "Model service saved.",
failed: "The AI model operation failed.",
encryptionKeyMissing: "Encrypted AI credentials require instance authentication. Configure authentication first; an independent credential key is optional for advanced deployments.",
+ privacyNotice: "Please use trusted model providers or API proxies to protect your personal privacy.",
},
aiPrompts: {
title: "Prompt library",
diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.ts
index 35d3aa04..bd4c1a5a 100644
--- a/packages/shared/src/i18n/zh-CN.ts
+++ b/packages/shared/src/i18n/zh-CN.ts
@@ -716,6 +716,7 @@ export const zhCN = {
saved: "模型服务已保存。",
failed: "AI 模型操作失败。",
encryptionKeyMissing: "加密保存 AI 凭据需要先启用实例认证;标准部署无需增加环境变量,高级部署可选用独立凭据密钥。",
+ privacyNotice: "请务必选用可信赖的模型服务商或 API 代理节点,避免个人隐私泄露。",
},
aiPrompts: {
title: "指令库",