Skip to content

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

refactor(settings): remove AI tag prompt configuration and product hunt link

tianma-if5fe220704e69
diff --git a/apps/api/src/ai-routes.test.mjs b/apps/api/src/ai-routes.test.mjs
index 84386802..5e4762fb 100644
--- a/apps/api/src/ai-routes.test.mjs
+++ b/apps/api/src/ai-routes.test.mjs
@@ -6,8 +6,6 @@ import {
AI_ACTIONS,
AiGenerateSchema,
AiTagSuggestionsRequestSchema,
- DEFAULT_AI_TAG_SUGGESTION_PROMPT,
- DEFAULT_AI_TAG_SUGGESTION_PROMPT_ZH_CN,
} from "@edgeever/shared";
import { registerAiRoutes } from "./ai-routes.ts";
@@ -180,59 +178,6 @@ describe("AI route contracts", () => {
}).success).toBe(false);
});
- test("stores and restores the workspace AI tag suggestion prompt", async () => {
- const { sqlite, environment: databaseEnvironment } = createDatabaseEnvironment();
- const app = createApp();
-
- const initial = await app.request("/api/v1/ai/settings", {}, databaseEnvironment);
- expect(await initial.json()).toMatchObject({
- tagSuggestionPrompt: DEFAULT_AI_TAG_SUGGESTION_PROMPT,
- tagSuggestionPromptCustomized: false,
- });
-
- const initialChinese = await app.request("/api/v1/ai/settings?locale=zh-CN", {}, databaseEnvironment);
- expect(await initialChinese.json()).toMatchObject({
- tagSuggestionPrompt: DEFAULT_AI_TAG_SUGGESTION_PROMPT_ZH_CN,
- tagSuggestionPromptCustomized: false,
- });
-
- const customized = await app.request(
- "/api/v1/ai/tag-suggestion-prompt",
- {
- method: "PUT",
- headers: { "content-type": "application/json" },
- body: JSON.stringify({ prompt: "只推荐人物、作品类型和创作手法。" }),
- },
- databaseEnvironment,
- );
- expect(customized.status).toBe(200);
- expect(await customized.json()).toMatchObject({
- tagSuggestionPrompt: "只推荐人物、作品类型和创作手法。",
- tagSuggestionPromptCustomized: true,
- });
-
- const customizedEnglish = await app.request("/api/v1/ai/settings?locale=en-US", {}, databaseEnvironment);
- expect(await customizedEnglish.json()).toMatchObject({
- tagSuggestionPrompt: "只推荐人物、作品类型和创作手法。",
- tagSuggestionPromptCustomized: true,
- });
-
- const restored = await app.request(
- "/api/v1/ai/tag-suggestion-prompt?locale=zh-CN",
- {
- method: "PUT",
- headers: { "content-type": "application/json" },
- body: JSON.stringify({ prompt: null }),
- },
- databaseEnvironment,
- );
- expect(await restored.json()).toMatchObject({
- tagSuggestionPrompt: DEFAULT_AI_TAG_SUGGESTION_PROMPT_ZH_CN,
- tagSuggestionPromptCustomized: false,
- });
- sqlite.close();
- });
-
test("returns normalized AI tag suggestions and reuses canonical workspace tags", async () => {
const { sqlite, environment: databaseEnvironment } = createDatabaseEnvironment();
sqlite.query("INSERT INTO notebooks (id, workspace_id, name) VALUES (?, ?, ?)")
diff --git a/apps/api/src/ai-routes.ts b/apps/api/src/ai-routes.ts
index ea36f937..417ddca1 100644
--- a/apps/api/src/ai-routes.ts
+++ b/apps/api/src/ai-routes.ts
@@ -6,9 +6,9 @@ import {
AiProviderConfigCreateSchema,
AiProviderConfigUpdateSchema,
AiProviderConnectionTestSchema,
- AiTagSuggestionPromptUpdateSchema,
AiTagSuggestionsRequestSchema,
buildAiTagSuggestionRequest,
+ getDefaultAiTagSuggestionPrompt,
finalizeAiTagSuggestions,
promptNeedsTargetLanguage,
promptNeedsTone,
@@ -31,7 +31,6 @@ import {
getAiModelConfig,
getAiProviderConfig,
getAiSettings,
- getAiTagSuggestionPrompt,
getDefaultAiModelId,
generateAiGeneration,
generateAiTagSuggestions,
@@ -92,7 +91,6 @@ const readSettings = (context: AppContext, dependencies: AiRouteDependencies) =>
getWorkspaceId(context),
encryptionConfigured(context),
dependencies.isDemoMode(context.env),
- context.req.query("locale"),
context.env,
);
@@ -539,38 +537,6 @@ export const registerAiRoutes = (app: Hono<AppEnv>, dependencies: AiRouteDepende
},
);
- app.put(
- "/api/v1/ai/tag-suggestion-prompt",
- zValidator("json", AiTagSuggestionPromptUpdateSchema),
- async (context) => {
- const denied = denyMutation(context, dependencies);
- if (denied) return denied;
- const input = context.req.valid("json");
- const workspaceId = getWorkspaceId(context);
- const now = isoNow();
- await context.env.storage.db.batch([
- context.env.storage.db.prepare(
- `INSERT INTO ai_workspace_settings (
- workspace_id, tag_suggestion_prompt, created_at, updated_at
- ) VALUES (?, ?, ?, ?)
- ON CONFLICT(workspace_id) DO UPDATE SET
- tag_suggestion_prompt = excluded.tag_suggestion_prompt,
- updated_at = excluded.updated_at`,
- ).bind(workspaceId, input.prompt, now, now),
- auditStatement(
- context.env.storage.db,
- "user",
- context.get("auth").actorId,
- "workspace.ai_tag_suggestion_prompt.update",
- "workspace",
- workspaceId,
- { customized: input.prompt !== null },
- ),
- ]);
- return context.json(await readSettings(context, dependencies));
- },
- );
-
app.post(
"/api/v1/ai/tag-suggestions/prepare",
zValidator("json", AiTagSuggestionsRequestSchema),
@@ -600,7 +566,7 @@ export const registerAiRoutes = (app: Hono<AppEnv>, dependencies: AiRouteDepende
const fields = buildAiTagSuggestionRequest({
...input,
existingTags,
- instruction: await getAiTagSuggestionPrompt(context.env.storage.db, workspaceId, input.locale),
+ instruction: getDefaultAiTagSuggestionPrompt(input.locale),
});
return context.json({
...credentials,
@@ -641,7 +607,7 @@ export const registerAiRoutes = (app: Hono<AppEnv>, dependencies: AiRouteDepende
: await generateAiTagSuggestions({
...input,
existingTags,
- instruction: await getAiTagSuggestionPrompt(context.env.storage.db, workspaceId, input.locale),
+ instruction: getDefaultAiTagSuggestionPrompt(input.locale),
model: await loadDefaultAiModel(context.env.storage.db, workspaceId, context.env),
abortSignal: context.req.raw.signal,
});
diff --git a/apps/api/src/ai-service.ts b/apps/api/src/ai-service.ts
index 83f93c41..7b11b2ab 100644
--- a/apps/api/src/ai-service.ts
+++ b/apps/api/src/ai-service.ts
@@ -16,7 +16,6 @@ import {
createAiGenerationResultBoundary,
createAiGenerationStreamNormalizer,
getDefaultAiPromptSeed,
- getDefaultAiTagSuggestionPrompt,
isAiTextAttachment,
normalizeAiGenerationText,
} from "@edgeever/shared";
@@ -155,17 +154,6 @@ export const getDefaultAiModelId = async (db: DatabaseAdapter, workspaceId: stri
return row?.default_model_id ?? null;
};
-export const getAiTagSuggestionPrompt = async (
- db: DatabaseAdapter,
- workspaceId: string,
- locale?: string,
-) => {
- const row = await db.prepare(
- `SELECT tag_suggestion_prompt FROM ai_workspace_settings WHERE workspace_id = ? LIMIT 1`,
- ).bind(workspaceId).first<{ tag_suggestion_prompt: string | null }>();
- return row?.tag_suggestion_prompt?.trim() || getDefaultAiTagSuggestionPrompt(locale);
-};
-
export const mapAiModelConfig = (row: AiModelConfigRow): AiModelConfig => ({
id: row.id,
providerConfigId: row.provider_config_id,
@@ -209,10 +197,9 @@ export const getAiSettings = async (
workspaceId: string,
encryptionConfigured: boolean,
readOnly: boolean,
- locale?: string,
environment?: AiCredentialEnvironment,
): Promise<AiSettings> => {
- const [providersResult, modelsResult, defaultModelId, promptRow] = await Promise.all([
+ const [providersResult, modelsResult, defaultModelId] = await Promise.all([
db.prepare(
`${selectProviderSql} WHERE workspace_id = ? ORDER BY created_at ASC, id ASC`,
).bind(workspaceId).all<AiProviderConfigRow>(),
@@ -224,19 +211,12 @@ export const getAiSettings = async (
ORDER BY created_at ASC, id ASC`,
).bind(workspaceId).all<AiModelConfigRow>(),
getDefaultAiModelId(db, workspaceId),
- db.prepare(
- `SELECT tag_suggestion_prompt FROM ai_workspace_settings WHERE workspace_id = ? LIMIT 1`,
- ).bind(workspaceId).first<{ tag_suggestion_prompt: string | null }>(),
]);
- const customizedPrompt = promptRow?.tag_suggestion_prompt?.trim() || null;
-
return {
providers: await Promise.all(providersResult.results.map((provider) =>
withAiCredentialAvailability(provider, modelsResult.results, encryptionConfigured, environment))),
defaultModelId,
- tagSuggestionPrompt: customizedPrompt ?? getDefaultAiTagSuggestionPrompt(locale),
- tagSuggestionPromptCustomized: Boolean(customizedPrompt),
encryptionConfigured,
readOnly,
};
diff --git a/apps/api/src/plugin-capability-routes.ts b/apps/api/src/plugin-capability-routes.ts
index 8e554211..5a3441bb 100644
--- a/apps/api/src/plugin-capability-routes.ts
+++ b/apps/api/src/plugin-capability-routes.ts
@@ -43,7 +43,7 @@ export function registerPluginCapabilityRoutes(app: Hono<AppEnv>, dependencies:
});
app.get('/api/v1/plugins/ai/status', async c => {
if (dependencies.aiStatus) return c.json(await dependencies.aiStatus());
- const settings = await getAiSettings(c.env.storage.db, getWorkspaceId(c), Boolean(resolvePrimaryAiCredentialEncryptionKey(c.env)), false, undefined, c.env);
+ const settings = await getAiSettings(c.env.storage.db, getWorkspaceId(c), Boolean(resolvePrimaryAiCredentialEncryptionKey(c.env)), false, c.env);
const provider = settings.providers.find(p => p.isEnabled && p.models.some(m => m.id === settings.defaultModelId));
const model = provider?.models.find(m => m.id === settings.defaultModelId);
return c.json({ configured: Boolean(model), ...(model ? { modelName: model.displayName } : {}) });
diff --git a/apps/web/src/components/SettingsPane.tsx b/apps/web/src/components/SettingsPane.tsx
index e0151d36..12802c2e 100644
--- a/apps/web/src/components/SettingsPane.tsx
+++ b/apps/web/src/components/SettingsPane.tsx
@@ -26,14 +26,12 @@ import { DesktopLocalDataCard } from "./settings/DesktopLocalDataCard";
import { LoginDevicesCard } from "./settings/LoginDevicesCard";
import { EvernoteImportGuideCard } from "./settings/EvernoteImportGuideCard";
import { FeedbackLink } from "./settings/FeedbackLink";
-import { ProductHuntLink } from "./settings/ProductHuntLink";
import { McpConfigCard } from "./settings/McpConfigCard";
import { PreferenceCard } from "./settings/PreferenceCard";
import { PasswordCard } from "./settings/PasswordCard";
import { UserManagementCard } from "./settings/UserManagementCard";
import { ObjectStorageCard } from "./settings/ObjectStorageCard";
import { AiModelCard } from "./settings/AiModelCard";
-import { AiTagSuggestionPromptCard } from "./settings/AiTagSuggestionPromptCard";
import { ThemeToggle } from "./ThemeToggle";
import type { AuthUser } from "@edgeever/shared";
import { contentEnterMotion } from "@/lib/motion";
@@ -127,11 +125,15 @@ export const SettingsPane = ({
},
]
: []),
- {
- key: "advanced",
- label: t("settings.tabs.advanced"),
- icon: Wrench,
- },
+ ...(isOwner || canClearLocalData
+ ? [
+ {
+ key: "advanced" as const,
+ label: t("settings.tabs.advanced"),
+ icon: Wrench,
+ },
+ ]
+ : []),
{
key: "account",
label: t("settings.tabs.account"),
@@ -177,7 +179,6 @@ export const SettingsPane = ({
onEditorContentAlignmentChange={onEditorContentAlignmentChange}
/>
<FeedbackLink className="hidden lg:flex" />
- <ProductHuntLink className="hidden lg:flex" />
</SettingsGroup>
);
case "users":
@@ -203,7 +204,6 @@ export const SettingsPane = ({
case "advanced":
return (
<SettingsGroup>
- <AiTagSuggestionPromptCard />
{isOwner ? <ObjectStorageCard demoMode={demoMode} /> : null}
{canClearLocalData ? <DesktopLocalDataCard /> : null}
</SettingsGroup>
@@ -377,7 +377,6 @@ export const SettingsPane = ({
<ChevronRight className="h-4 w-4 shrink-0 text-slate-400" />
</button>
<FeedbackLink />
- <ProductHuntLink />
</div>
</div>
) : (
diff --git a/apps/web/src/components/settings/AiTagSuggestionPromptCard.tsx b/apps/web/src/components/settings/AiTagSuggestionPromptCard.tsx
deleted file mode 100644
index 96d7c9b3..00000000
--- a/apps/web/src/components/settings/AiTagSuggestionPromptCard.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import { useEffect, useState } from "react";
-import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
-import { Bot, ChevronDown, Loader2, RotateCcw, Save } from "lucide-react";
-import { useTranslation } from "react-i18next";
-import { Button } from "@/components/ui/button";
-import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
-import {
- SETTINGS_CARD_DESCRIPTION_CLASSNAME,
- SETTINGS_CARD_HEADER_CLASSNAME,
- SETTINGS_CARD_ICON_CLASSNAME,
- SETTINGS_CARD_TITLE_CLASSNAME,
-} from "./settings-ui";
-import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
-import { trimAiText } from "@/components/settings/ai-provider-options";
-import { api } from "@/lib/api";
-import { cn } from "@/lib/utils";
-
-export const AiTagSuggestionPromptCard = () => {
- const { i18n, t } = useTranslation();
- const queryClient = useQueryClient();
- const [expanded, setExpanded] = useState(false);
- const locale = i18n.resolvedLanguage ?? i18n.language;
- const settingsQuery = useQuery({
- queryKey: ["ai-settings", locale],
- queryFn: () => api.getAiSettings(locale),
- });
- const [prompt, setPrompt] = useState("");
-
- useEffect(() => {
- if (settingsQuery.data) setPrompt(settingsQuery.data.tagSuggestionPrompt ?? "");
- }, [settingsQuery.data]);
-
- const updateMutation = useMutation({
- mutationFn: (nextPrompt: string | null) => api.updateAiTagSuggestionPrompt({ prompt: nextPrompt }, locale),
- onSuccess: async (settings) => {
- setPrompt(settings.tagSuggestionPrompt ?? "");
- await queryClient.invalidateQueries({ queryKey: ["ai-settings"] });
- },
- });
- const settings = settingsQuery.data;
- const promptText = prompt ?? "";
- const trimmedPrompt = trimAiText(promptText);
- const unchanged = Boolean(settings) && trimmedPrompt === (settings?.tagSuggestionPrompt ?? "");
- const disabled = !settings || settings.readOnly || updateMutation.isPending;
- const error = updateMutation.error ?? settingsQuery.error;
-
- return (
- <Collapsible open={expanded} onOpenChange={setExpanded} asChild>
- <Card className="w-full min-w-0 overflow-hidden shadow-none">
- <CardHeader className={SETTINGS_CARD_HEADER_CLASSNAME}>
- <CollapsibleTrigger asChild>
- <button className="flex w-full min-w-0 items-start justify-between gap-3 text-left" type="button">
- <span className="min-w-0">
- <CardTitle className={SETTINGS_CARD_TITLE_CLASSNAME}>
- <Bot className={SETTINGS_CARD_ICON_CLASSNAME} />
- {t("settings.aiTagPromptTitle")}
- </CardTitle>
- <CardDescription className={SETTINGS_CARD_DESCRIPTION_CLASSNAME}>
- {t("settings.aiTagPromptDescription")}
- </CardDescription>
- </span>
- <ChevronDown className={cn("mt-0.5 h-4 w-4 shrink-0 text-slate-400 transition-transform", expanded && "rotate-180")} />
- </button>
- </CollapsibleTrigger>
- </CardHeader>
- <CollapsibleContent asChild>
- <CardContent className="grid gap-3 px-4 pb-4 pt-0">
- {settingsQuery.isLoading ? (
- <p className="flex items-center gap-2 text-xs leading-5 text-slate-500">
- <Loader2 className="h-4 w-4 animate-spin" />{t("common.loading")}
- </p>
- ) : (
- <>
- <textarea
- aria-label={t("settings.aiTagPromptTitle")}
- className="min-h-44 w-full resize-y rounded-md border border-slate-200 bg-card px-3 py-2 font-mono text-xs leading-5 text-slate-800 outline-none transition focus:border-slate-900 focus:ring-2 focus:ring-slate-200 disabled:cursor-not-allowed disabled:bg-slate-50 disabled:text-slate-500"
- disabled={disabled}
- maxLength={4000}
- onChange={(event) => setPrompt(event.target.value)}
- value={promptText}
- />
- <div className="text-right text-xs text-slate-500">{promptText.length}/4000</div>
- {error ? <p className="text-xs font-medium text-rose-600" role="alert">{t("settings.aiTagPromptFailed")}</p> : null}
- {updateMutation.isSuccess ? <p className="text-xs font-medium text-emerald-700" role="status">{t("settings.aiTagPromptSaved")}</p> : null}
- <div className="flex flex-wrap justify-end gap-2">
- <Button
- type="button"
- variant="outline"
- disabled={disabled || !settings?.tagSuggestionPromptCustomized}
- onClick={() => updateMutation.mutate(null)}
- >
- <RotateCcw className="h-4 w-4" />{t("settings.aiTagPromptRestore")}
- </Button>
- <Button
- type="button"
- disabled={disabled || !trimmedPrompt || unchanged}
- onClick={() => updateMutation.mutate(trimmedPrompt)}
- >
- {updateMutation.isPending ? <Loader2 className="h-4 w-4 animate-spin" /> : <Save className="h-4 w-4" />}
- {t("common.save")}
- </Button>
- </div>
- </>
- )}
- </CardContent>
- </CollapsibleContent>
- </Card>
- </Collapsible>
- );
-};
diff --git a/apps/web/src/components/settings/ProductHuntLink.tsx b/apps/web/src/components/settings/ProductHuntLink.tsx
deleted file mode 100644
index 3f248e18..00000000
--- a/apps/web/src/components/settings/ProductHuntLink.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { ExternalLink } from "lucide-react";
-import { useTranslation } from "react-i18next";
-import { cn } from "@/lib/utils";
-
-const PRODUCT_HUNT_URL =
- "https://www.producthunt.com/products/edgeever?launch=edgeever&utm_source=edgeever&utm_medium=settings&utm_campaign=product_hunt";
-
-const ProductHuntMark = ({ className }: { className?: string }) => (
- <svg className={className} viewBox="0 0 24 24" aria-hidden="true">
- <path
- fill="#DA552F"
- d="M13.604 8.4h-3.405V12h3.405c.995 0 1.801-.806 1.801-1.801 0-.993-.806-1.799-1.801-1.799zM12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zm1.604 14.4h-3.405V18H8.4V6h5.204c2.316 0 4.2 1.882 4.2 4.2 0 2.319-1.884 4.2-4.2 4.2z"
- />
- </svg>
-);
-
-export const ProductHuntLink = ({ className }: { className?: string }) => {
- const { t } = useTranslation();
-
- return (
- <a
- className={cn(
- "flex min-h-16 w-full items-center justify-between gap-3 rounded-xl px-4 py-2.5 text-left text-xs font-normal leading-5 text-slate-600 transition-colors hover:bg-slate-200/50 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-900/20",
- className
- )}
- href={PRODUCT_HUNT_URL}
- target="_blank"
- rel="noopener noreferrer"
- >
- <span className="flex min-w-0 items-center gap-3 lg:gap-2">
- <span className="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-slate-100 lg:h-4 lg:w-4 lg:rounded-none lg:bg-transparent">
- <ProductHuntMark className="h-4 w-4" />
- </span>
- <span className="min-w-0">
- <span className="block truncate">{t("productHunt.title")}</span>
- <span className="mt-0.5 block truncate text-xs font-normal text-slate-500">{t("productHunt.description")}</span>
- </span>
- </span>
- <ExternalLink className="h-4 w-4 shrink-0 text-slate-400" />
- </a>
- );
-};
diff --git a/apps/web/src/components/settings/ai-provider-options.test.mjs b/apps/web/src/components/settings/ai-provider-options.test.mjs
index d27bd7e0..091d8a30 100644
--- a/apps/web/src/components/settings/ai-provider-options.test.mjs
+++ b/apps/web/src/components/settings/ai-provider-options.test.mjs
@@ -25,13 +25,6 @@ describe("AI provider display names", () => {
});
describe("AI settings cards tolerate missing text fields", () => {
- test("tag suggestion prompt does not trim an unchecked API field", () => {
- const source = readFileSync(new URL("./AiTagSuggestionPromptCard.tsx", import.meta.url), "utf8");
- expect(source).toContain("tagSuggestionPrompt ?? \"\"");
- expect(source).toContain("trimAiText(promptText)");
- expect(source).not.toContain("prompt.trim()");
- });
-
test("provider cards trim optional names and URLs through the shared helper", () => {
const providerCard = readFileSync(new URL("./AiProviderCard.tsx", import.meta.url), "utf8");
const modelCard = readFileSync(new URL("./AiModelCard.tsx", import.meta.url), "utf8");
diff --git a/packages/client/src/index.test.mjs b/packages/client/src/index.test.mjs
index 2f544630..2f6d7a50 100644
--- a/packages/client/src/index.test.mjs
+++ b/packages/client/src/index.test.mjs
@@ -447,21 +447,6 @@ describe("EdgeEver client HTTP contract", () => {
expect(requestUrl).toBe("/api/v1/memos?tag=%E4%BA%A7%E5%93%81+%E5%92%8C+%E4%BA%A4%E4%BA%92");
});
- test("updates the workspace AI tag suggestion prompt", async () => {
- let call;
- const client = createEdgeEverClient({
- fetch: async (input, init) => {
- call = { input: String(input), init };
- return jsonResponse({ tagSuggestionPrompt: "Custom", tagSuggestionPromptCustomized: true });
- },
- });
-
- await client.updateAiTagSuggestionPrompt({ prompt: "Custom" }, "zh-CN");
- expect(call.input).toBe("/api/v1/ai/tag-suggestion-prompt?locale=zh-CN");
- expect(call.init.method).toBe("PUT");
- expect(JSON.parse(call.init.body)).toEqual({ prompt: "Custom" });
- });
-
test("preserves API error codes and invokes unauthorized handling", async () => {
let unauthorized = 0;
const client = createEdgeEverClient({
diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts
index 2b283722..4862dcfd 100644
--- a/packages/client/src/index.ts
+++ b/packages/client/src/index.ts
@@ -60,7 +60,6 @@ import type {
AiGenerateInput,
InfographicAgentEvent,
InfographicAgentRequest,
- AiTagSuggestionPromptUpdateInput,
AiTagSuggestionsRequestInput,
AiTagSuggestionsResponse,
SyncBootstrapResponse,
@@ -936,12 +935,6 @@ export const createEdgeEverClient = (options: EdgeEverClientOptions = {}) => {
body: JSON.stringify({ modelConfigId }),
}),
- updateAiTagSuggestionPrompt: (payload: AiTagSuggestionPromptUpdateInput, locale?: string) =>
- request<AiSettings>(`/api/v1/ai/tag-suggestion-prompt${locale ? `?locale=${encodeURIComponent(locale)}` : ""}`, {
- method: "PUT",
- body: JSON.stringify(payload),
- }),
-
listAiPrompts: (locale?: string) => {
const search = locale ? `?locale=${encodeURIComponent(locale)}` : "";
return request<{ prompts: AiPromptTemplate[] }>(`/api/v1/ai/prompts${search}`);
diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.ts
index 35404e7e..0a05c491 100644
--- a/packages/shared/src/i18n/en-US.ts
+++ b/packages/shared/src/i18n/en-US.ts
@@ -747,11 +747,6 @@ export const enUS = {
systemLanguage: "Follow system",
imageCompressionTitle: "Compress note images",
imageCompressionAria: "Compress note images",
- aiTagPromptTitle: "AI tag suggestion instruction",
- aiTagPromptDescription: "Customize how AI derives tags from note content. This workspace setting is shared by every client.",
- aiTagPromptRestore: "Restore default instruction",
- aiTagPromptSaved: "The AI tag suggestion instruction was saved.",
- aiTagPromptFailed: "Failed to save the AI tag suggestion instruction.",
aiSelectionMenuTitle: "Show AI assistant when text is selected",
aiSelectionMenuAria: "Show the AI assistant action when text is selected",
aiSpaceShortcutTitle: "Open AI with Space in an empty block",
@@ -1375,10 +1370,6 @@ export const enUS = {
desktopUpdateInstalling: "Restarting to install update…",
desktopUpdateFailed: "Update failed. Please try again later.",
},
- productHunt: {
- title: "Product Hunt",
- description: "Upvote EdgeEver so more people can find it",
- },
feedback: {
title: "Feedback",
description: "Report a problem or suggest a feature",
diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.ts
index ec4ec4a8..26515616 100644
--- a/packages/shared/src/i18n/ja.ts
+++ b/packages/shared/src/i18n/ja.ts
@@ -747,11 +747,6 @@ export const ja = {
systemLanguage: "システムに合わせる",
imageCompressionTitle: "ノート内の画像を圧縮",
imageCompressionAria: "ノート内の画像を圧縮する",
- aiTagPromptTitle: "AI タグ提案の指示",
- aiTagPromptDescription: "ノート本文からタグをどう作るかをカスタマイズします。このワークスペース設定はすべてのクライアントで共有されます。",
- aiTagPromptRestore: "デフォルトの指示に戻す",
- aiTagPromptSaved: "AI タグ提案の指示を保存しました。",
- aiTagPromptFailed: "AI タグ提案の指示を保存できませんでした。",
aiSelectionMenuTitle: "文字選択時に AI アシスタントを表示",
aiSelectionMenuAria: "文字選択時に AI アシスタント操作を表示する",
aiSpaceShortcutTitle: "空のブロックで Space から AI を開く",
@@ -1375,10 +1370,6 @@ export const ja = {
desktopUpdateInstalling: "再起動して更新をインストールしています…",
desktopUpdateFailed: "更新に失敗しました。しばらくしてから再試行してください。",
},
- productHunt: {
- title: "Product Hunt",
- description: "EdgeEver に投票して、より多くの人に見つけてもらいましょう",
- },
feedback: {
title: "フィードバック",
description: "問題の報告や機能の提案",
diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.ts
index a65cb08f..10cd6a00 100644
--- a/packages/shared/src/i18n/zh-CN.ts
+++ b/packages/shared/src/i18n/zh-CN.ts
@@ -747,11 +747,6 @@ export const zhCN = {
systemLanguage: "跟随系统",
imageCompressionTitle: "压缩笔记内图片",
imageCompressionAria: "是否压缩笔记内图片",
- aiTagPromptTitle: "AI 标签建议指令",
- aiTagPromptDescription: "自定义 AI 如何根据笔记内容生成标签。此设置保存在工作区,各端共用。",
- aiTagPromptRestore: "恢复默认指令",
- aiTagPromptSaved: "AI 标签建议指令已保存。",
- aiTagPromptFailed: "AI 标签建议指令保存失败。",
aiSelectionMenuTitle: "选中文字时显示 AI 助手",
aiSelectionMenuAria: "选中文字时是否显示 AI 助手入口",
aiSpaceShortcutTitle: "空白段落按 Space 唤起 AI",
@@ -1375,10 +1370,6 @@ export const zhCN = {
desktopUpdateInstalling: "正在重启并安装更新…",
desktopUpdateFailed: "更新失败,请稍后重试。",
},
- productHunt: {
- title: "Product Hunt",
- description: "为我们投票,让更多人发现 EdgeEver",
- },
feedback: {
title: "意见反馈",
description: "报告问题或提出功能建议",
diff --git a/packages/shared/src/schemas.ts b/packages/shared/src/schemas.ts
index 7c7ca8e6..ba94a880 100644
--- a/packages/shared/src/schemas.ts
+++ b/packages/shared/src/schemas.ts
@@ -360,10 +360,6 @@ export const AiTagSuggestionsRequestSchema = z.object({
}
});
-export const AiTagSuggestionPromptUpdateSchema = z.object({
- prompt: z.string().trim().min(1).max(4_000).nullable(),
-});
-
export const AiPromptTemplateCreateSchema = z.object({
name: z.string().trim().min(1).max(80),
description: z.string().trim().max(200).optional(),
@@ -476,7 +472,6 @@ export type AiDefaultModelUpdateInput = z.infer<typeof AiDefaultModelUpdateSchem
export type AiGenerateInput = z.input<typeof AiGenerateSchema>;
export type AiAttachmentInput = z.infer<typeof AiAttachmentSchema>;
export type AiTagSuggestionsRequestInput = z.infer<typeof AiTagSuggestionsRequestSchema>;
-export type AiTagSuggestionPromptUpdateInput = z.infer<typeof AiTagSuggestionPromptUpdateSchema>;
export type AiPromptTemplateCreateInput = z.input<typeof AiPromptTemplateCreateSchema>;
export type AiPromptTemplateUpdateInput = z.infer<typeof AiPromptTemplateUpdateSchema>;
export type MemoShareUpdateInput = z.infer<typeof MemoShareUpdateSchema>;
diff --git a/packages/shared/src/types.ts b/packages/shared/src/types.ts
index 30b55a8d..7d88dc84 100644
--- a/packages/shared/src/types.ts
+++ b/packages/shared/src/types.ts
@@ -202,8 +202,6 @@ export type AiProviderConfig = {
export type AiSettings = {
providers: AiProviderConfig[];
defaultModelId: string | null;
- tagSuggestionPrompt: string;
- tagSuggestionPromptCustomized: boolean;
encryptionConfigured: boolean;
readOnly: boolean;
};