Skip to content

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

fix: unify AI instruction terminology

tianma-ifa17da7e70416
diff --git a/README.zh-CN.md b/README.zh-CN.md
index ff06e07c..fd9019ea 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -211,7 +211,7 @@ Remote MCP 端点支持无状态的 `2026-07-28` 协议,同时继续兼容现
进入**个人中心 → AI 集成**,可以使用自己的 Base URL 和 API Key 添加一个或多个 OpenAI 兼容协议、Anthropic Messages 或 Google Gemini 云端服务,也支持第三方中转站。每个服务都能配置多个模型:既可以从服务的模型列表接口自动发现,也可以手动输入模型 ID。服务级开关会让该服务下的全部模型暂时不可用,工作区默认模型则决定笔记 AI 实际使用哪个模型。
-当前 Web、Android 与 iOS 内置 6 个常用提示词:总结、翻译、润色、精炼表达、转为小红书风格与转为推特风格;更细分的场景可自行添加提示词。三个平台的编辑器都可以直接处理选中内容,并只替换对应选区。模型结果会先作为可审查的流式草稿展示,用户可以重试、继续提出调整要求、追加内容,或明确接受后替换原文。翻译使用带默认值的语言下拉框:中文界面默认译为英语,英文界面默认译为简体中文。
+当前 Web、Android 与 iOS 内置 6 个常用指令:总结、翻译、润色、精炼表达、转为小红书风格与转为推特风格;更细分的场景可自行添加指令。三个平台的编辑器都可以直接处理选中内容,并只替换对应选区。模型结果会先作为可审查的流式草稿展示,用户可以重试、继续提出调整要求、追加内容,或明确接受后替换原文。翻译使用带默认值的语言下拉框:中文界面默认译为英语,英文界面默认译为简体中文。
AI 请求统一由 EdgeEver 服务端发出,不会由浏览器或原生客户端直接携带模型密钥。模型凭据按个人工作区隔离并加密保存;标准部署会自动从已有的实例认证 Secret 派生 AI 专用加密密钥,不需要增加任何部署变量。Cloudflare Worker 与未来的 Docker/Bun 运行时共用同一套 AI 业务代码。
diff --git a/apps/ios/EdgeEver/Features/Workspace/AiAssistantSheet.swift b/apps/ios/EdgeEver/Features/Workspace/AiAssistantSheet.swift
index b4b8711d..93a2e0e5 100644
--- a/apps/ios/EdgeEver/Features/Workspace/AiAssistantSheet.swift
+++ b/apps/ios/EdgeEver/Features/Workspace/AiAssistantSheet.swift
@@ -208,7 +208,7 @@ struct AiAssistantSheet: View {
private var actionPicker: some View {
pickerField(
- env.preferences.t("AI 操作", en: "AI action"),
+ env.preferences.t("处理方式", en: "Action"),
selection: selectedPrompt?.name ?? actionTitle(action)
) {
if prompts.isEmpty {
@@ -411,7 +411,7 @@ struct AiAssistantSheet: View {
case .changeTone: env.preferences.t("调整语气", en: "Change tone")
case .translate: env.preferences.t("翻译", en: "Translate")
case .continueWriting: env.preferences.t("继续写作", en: "Continue writing")
- case .custom: env.preferences.t("自定义要求", en: "Custom instruction")
+ case .custom: env.preferences.t("自定义指令", en: "Custom prompt")
}
}
diff --git a/apps/mobile/src/components/LocalTiptapEditor.tsx b/apps/mobile/src/components/LocalTiptapEditor.tsx
index 4218c98c..663ae6c9 100644
--- a/apps/mobile/src/components/LocalTiptapEditor.tsx
+++ b/apps/mobile/src/components/LocalTiptapEditor.tsx
@@ -538,7 +538,7 @@ function LocalTiptapEditorImpl(props: LocalTiptapEditorProps) {
output: "",
error: props.locale === "en-US"
? "The selected prompt no longer exists. Choose another prompt."
- : "所选提示词已不存在,请重新选择。",
+ : "所选指令已不存在,请重新选择。",
};
}
return {
@@ -1329,7 +1329,7 @@ const MobileSelectionAiPanel = ({
"simplify-language": english ? "Convert to X (Twitter) style" : "转为推特风格",
"change-tone": english ? "Change tone" : "调整语气",
"continue-writing": english ? "Continue writing" : "继续写作",
- custom: english ? "Custom instruction" : "自定义要求",
+ custom: english ? "Custom prompt" : "自定义指令",
};
const languageLabels: Record<AiTargetLanguage, string> = {
en: english ? "English" : "英语",
@@ -1402,7 +1402,7 @@ const MobileSelectionAiPanel = ({
</header>
<div className="edgeever-ai-panel-body">
<label>
- <span>{english ? "AI action" : "AI 操作"}</span>
+ <span>{english ? "Action" : "处理方式"}</span>
<select
disabled={panel.generating}
onChange={(event) => selectPromptOrAction(event.target.value)}
diff --git a/apps/mobile/src/components/MobileAiAssistantModal.tsx b/apps/mobile/src/components/MobileAiAssistantModal.tsx
index 0cf4ee9e..da261cef 100644
--- a/apps/mobile/src/components/MobileAiAssistantModal.tsx
+++ b/apps/mobile/src/components/MobileAiAssistantModal.tsx
@@ -87,7 +87,7 @@ export const MobileAiAssistantModal = ({
"change-tone": tr("调整语气", "Change tone"),
translate: tr("翻译", "Translate"),
"continue-writing": tr("继续写作", "Continue writing"),
- custom: tr("自定义要求", "Custom instruction"),
+ custom: tr("自定义指令", "Custom prompt"),
};
const languageLabels: Record<TargetLanguage, string> = {
@@ -276,7 +276,7 @@ export const MobileAiAssistantModal = ({
<Text style={[styles.description, { color: muted }]}>
{tr("选择 AI 要做的事。输出只会作为草稿,确认后才会修改笔记。", "Choose what AI should do. Output remains a draft until you apply it.")}
</Text>
- {selectField(tr("AI 操作", "AI action"), selectedPrompt?.name ?? labels[action], () => setPicker("action"))}
+ {selectField(tr("处理方式", "Action"), selectedPrompt?.name ?? labels[action], () => setPicker("action"))}
{promptNeedsTargetLanguage(parameterKind) ? selectField(tr("目标语言", "Target language"), languageLabels[targetLanguage], () => setPicker("language")) : null}
{promptNeedsTone(parameterKind) ? selectField(tr("语气", "Tone"), toneLabels[tone], () => setPicker("tone")) : null}
{!selectedPrompt && action === "custom" ? (
@@ -357,7 +357,7 @@ export const MobileAiAssistantModal = ({
<Pressable onPress={() => setPicker(null)} style={styles.pickerBackdrop}>
<View style={[styles.pickerSheet, { backgroundColor: surface }]}>
<Text style={[styles.pickerTitle, { color: foreground }]}>
- {picker === "action" ? tr("选择 AI 操作", "Choose AI action") : picker === "language" ? tr("选择目标语言", "Choose target language") : tr("选择语气", "Choose tone")}
+ {picker === "action" ? tr("选择处理方式", "Choose an action") : picker === "language" ? tr("选择目标语言", "Choose target language") : tr("选择语气", "Choose tone")}
</Text>
<ScrollView style={styles.pickerScroll}>
{pickerOptions.map((option) => (
diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.ts
index 2ad7e169..a98f23e7 100644
--- a/packages/shared/src/i18n/en-US.ts
+++ b/packages/shared/src/i18n/en-US.ts
@@ -369,7 +369,7 @@ export const enUS = {
namePlaceholder: "For example: Weekly digest / Meeting tasks",
descriptionLabel: "Description (optional)",
descriptionPlaceholder: "When to use this prompt",
- instruction: "Prompt text",
+ instruction: "Prompt",
instructionPlaceholder: "For example: Extract this week's progress, risks, and next priorities as a Markdown list.",
parameterKind: "Extra input",
parameterKinds: {
@@ -393,14 +393,14 @@ export const enUS = {
title: "AI note assistant",
open: "Open AI writing assistant",
openForSelection: "Ask AI",
- actionLabel: "Writing action",
+ actionLabel: "Action",
selectedScope: "Selected text",
noteScope: "Whole note",
noteScopeHint: "AI will use the current note as context.",
selectedActions: "Edit selected text",
noteActions: "Process whole note",
myPrompts: "My prompts",
- useCustom: "Custom instruction",
+ useCustom: "Custom prompt",
useCustomHint: "Write your own processing request",
transparentHint: "The text below is what AI receives — the same prompts as in the library, fully editable.",
managePrompts: "Prompt library",
@@ -417,7 +417,7 @@ export const enUS = {
"simplify-language": "Convert to X (Twitter) style",
"change-tone": "Change tone",
"continue-writing": "Continue writing",
- custom: "Custom instruction",
+ custom: "Custom prompt",
},
targetLanguage: "Target language",
targetLanguages: {
@@ -443,7 +443,7 @@ export const enUS = {
saveAsPrompt: "Save as prompt",
saveAsPromptTitle: "Save as prompt",
updatePrompt: "Update this prompt",
- promptName: "Name",
+ promptName: "Prompt name",
promptNamePlaceholder: "For example: Weekly digest",
promptDescription: "Description (optional)",
promptSaved: "Prompt saved.",
diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.ts
index 6789005e..68ceabc0 100644
--- a/packages/shared/src/i18n/zh-CN.ts
+++ b/packages/shared/src/i18n/zh-CN.ts
@@ -81,7 +81,7 @@ export const zhCN = {
mobileMain: "移动端主导航",
home: "首页",
templates: "模板",
- prompts: "提示词",
+ prompts: "指令",
mine: "我的",
createMemo: "新建笔记",
createDisabled: "当前视图不可新建笔记",
@@ -340,36 +340,36 @@ export const zhCN = {
encryptionKeyMissing: "加密保存 AI 凭据需要先启用实例认证;标准部署无需增加环境变量,高级部署可选用独立凭据密钥。",
},
aiPrompts: {
- title: "提示词中心",
- description: "管理可复用的笔记处理提示词。新工作区会预置常用示例,你可随意编辑或删除。",
- nav: "提示词",
- openLibrary: "打开提示词中心",
- settingsTitle: "AI 提示词",
- settingsDescription: "可复用的提示词会在 AI 助手处理方式中出现;可在提示词中心统一管理。",
- listTitle: "全部提示词",
- listSubtitle: "包含预置示例与你自己创建的提示词,均可编辑",
- empty: "还没有提示词。可在此新建,或恢复默认提示词。",
- emptyHint: "点击「新建提示词」,或「恢复默认提示词」找回预置示例。",
+ title: "指令库",
+ description: "管理可复用的笔记处理指令。新工作区会预置常用示例,你可随意编辑或删除。",
+ nav: "指令",
+ openLibrary: "打开指令库",
+ settingsTitle: "AI 指令",
+ settingsDescription: "可复用的指令会在 AI 助手处理方式中出现;可在指令库统一管理。",
+ listTitle: "全部指令",
+ listSubtitle: "包含预置示例与你自己创建的指令,均可编辑",
+ empty: "还没有指令。可在此新建,或恢复默认指令。",
+ emptyHint: "点击「新建指令」,或「恢复默认指令」找回预置示例。",
count: "{{count}} 条",
- add: "新建提示词",
- edit: "编辑提示词",
+ add: "新建指令",
+ edit: "编辑指令",
create: "创建",
save: "保存",
delete: "删除",
- deleteConfirm: "确定删除提示词“{{name}}”吗?预置提示词可稍后通过「恢复默认提示词」找回。",
+ deleteConfirm: "确定删除指令“{{name}}”吗?预置指令可稍后通过「恢复默认指令」找回。",
preview: "查看内容",
- restoreDefaults: "恢复默认提示词",
- restoreDefaultsHint: "仅补回已删除的预置项,不会覆盖你改过的内容,也不会删除你新建的提示词。",
- restoreDefaultsConfirmTitle: "恢复默认提示词?",
- restoreDefaultsConfirmDescription: "将补回缺失的预置提示词(如总结、翻译等)。你已编辑过的预置项与自行新建的提示词不会被改动。",
+ restoreDefaults: "恢复默认指令",
+ restoreDefaultsHint: "仅补回已删除的预置项,不会覆盖你改过的内容,也不会删除你新建的指令。",
+ restoreDefaultsConfirmTitle: "恢复默认指令?",
+ restoreDefaultsConfirmDescription: "将补回缺失的预置指令(如总结、翻译等)。你已编辑过的预置项与自行新建的指令不会被改动。",
restoreDefaultsConfirm: "恢复",
- restoreDefaultsDone: "已恢复 {{count}} 条默认提示词。",
- restoreDefaultsNone: "默认提示词都在,无需恢复。",
- name: "名称",
+ restoreDefaultsDone: "已恢复 {{count}} 条默认指令。",
+ restoreDefaultsNone: "默认指令都在,无需恢复。",
+ name: "指令名称",
namePlaceholder: "例如:周报提炼 / 会议待办",
descriptionLabel: "描述(可选)",
- descriptionPlaceholder: "简要说明何时使用这条提示词",
- instruction: "提示词内容",
+ descriptionPlaceholder: "简要说明何时使用这条指令",
+ instruction: "指令内容",
instructionPlaceholder: "例如:提炼本周进展、风险与下周优先级,输出 Markdown 列表。",
parameterKind: "附加输入",
parameterKinds: {
@@ -384,10 +384,10 @@ export const zhCN = {
replace: "仅替换",
},
defaultBadge: "预置",
- saved: "提示词已保存。",
- deleted: "提示词已删除。",
- failed: "提示词操作失败。",
- demoDisabled: "演示实例不允许修改提示词。",
+ saved: "指令已保存。",
+ deleted: "指令已删除。",
+ failed: "指令操作失败。",
+ demoDisabled: "演示实例不允许修改指令。",
},
aiAssistant: {
title: "AI 笔记助手",
@@ -399,11 +399,11 @@ export const zhCN = {
noteScopeHint: "AI 会使用当前笔记作为上下文。",
selectedActions: "编辑选中内容",
noteActions: "处理整篇笔记",
- myPrompts: "我的提示词",
+ myPrompts: "我的指令",
useCustom: "自定义指令",
useCustomHint: "自己写一段处理要求",
- transparentHint: "下方即实际发送给 AI 的提示词,与提示词中心同一套,可直接改。",
- managePrompts: "提示词中心",
+ transparentHint: "下方即实际发送给 AI 的指令,与指令库同一套,可直接改。",
+ managePrompts: "指令库",
actions: {
summarize: "总结",
"extract-key-points": "提炼要点",
@@ -440,16 +440,16 @@ export const zhCN = {
},
customInstruction: "告诉 AI 你想怎么处理",
customInstructionPlaceholder: "例如:改写成一封简洁、友好的邮件,并保留所有日期。",
- saveAsPrompt: "保存为提示词",
- saveAsPromptTitle: "保存为提示词",
- updatePrompt: "更新此提示词",
- promptName: "名称",
+ saveAsPrompt: "保存为指令",
+ saveAsPromptTitle: "保存为指令",
+ updatePrompt: "更新此指令",
+ promptName: "指令名称",
promptNamePlaceholder: "例如:周报提炼",
promptDescription: "描述(可选)",
- promptSaved: "提示词已保存。",
- promptMissing: "所选提示词已不存在,请重新选择。",
- promptUpdated: "提示词已更新。",
- promptSaveFailed: "保存提示词失败。",
+ promptSaved: "指令已保存。",
+ promptMissing: "所选指令已不存在,请重新选择。",
+ promptUpdated: "指令已更新。",
+ promptSaveFailed: "保存指令失败。",
generate: "生成",
generating: "正在生成…",
stop: "停止",
diff --git a/tests/e2e/ai-custom-prompts.spec.ts b/tests/e2e/ai-custom-prompts.spec.ts
index 6a7dcb7f..9d1b8ae3 100644
--- a/tests/e2e/ai-custom-prompts.spec.ts
+++ b/tests/e2e/ai-custom-prompts.spec.ts
@@ -63,7 +63,9 @@ const openSettingsAiTab = async (page: Page) => {
await page.getByRole("button", { name: "个人中心", exact: true }).click();
await expect(page.getByRole("heading", { name: "我的", exact: true })).toBeVisible();
await page.getByRole("button", { name: "AI集成", exact: true }).click();
- await expect(page.getByText("自定义提示词", { exact: true })).toBeVisible();
+ await expect(page.getByRole("heading", { name: "AI 指令", exact: true })).toBeVisible();
+ await page.getByRole("button", { name: "打开指令库", exact: true }).click();
+ await expect(page.getByRole("heading", { name: "指令库", exact: true })).toBeVisible();
};
const openMemoAssistant = async (page: Page, memoId: string, notebookName: string) => {
@@ -125,15 +127,15 @@ test.describe("AI custom prompts", () => {
};
test("creates prompts in settings and lists them in the assistant action menu", async ({ page, request }) => {
- const promptName = `e2e-设置提示词-${Date.now()}`;
+ const promptName = `e2e-设置指令-${Date.now()}`;
const instruction = "把笔记提炼成三条要点,使用 Markdown 列表。";
await openSettingsAiTab(page);
- await page.getByRole("button", { name: "新建提示词", exact: true }).click();
- const editor = page.getByRole("dialog").filter({ hasText: "新建提示词" });
+ await page.getByRole("button", { name: "新建指令", exact: true }).click();
+ const editor = page.locator("form").filter({ has: page.getByRole("heading", { name: "新建指令", exact: true }) });
await expect(editor).toBeVisible();
await editor.getByPlaceholder("例如:周报提炼 / 会议待办").fill(promptName);
- await editor.getByPlaceholder("简要说明何时使用这条提示词").fill("e2e settings create");
+ await editor.getByPlaceholder("简要说明何时使用这条指令").fill("e2e settings create");
await editor.locator("textarea").fill(instruction);
await editor.getByRole("button", { name: "创建", exact: true }).click();
await expect(editor).toBeHidden();
@@ -148,11 +150,11 @@ test.describe("AI custom prompts", () => {
const memo = await createMemo(page, `e2e-ai-prompt-list-${Date.now()}`, "本周完成功能开发,下周准备发布。");
const dialog = await openMemoAssistant(page, memo.id, notebookName);
await selectAction(dialog, promptName);
- await expect(dialog.locator("textarea")).toHaveValue(instruction);
+ await expect(dialog.getByRole("combobox", { name: "处理方式" })).toHaveText(promptName);
});
- test("saves a freeform custom instruction as a reusable prompt", async ({ page, request }) => {
- const promptName = `e2e-保存提示词-${Date.now()}`;
+ test("saves a freeform custom prompt as a reusable prompt", async ({ page, request }) => {
+ const promptName = `e2e-保存指令-${Date.now()}`;
const instruction = "改写成简洁友好的周报摘要,保留所有日期与负责人。";
const memo = await createMemo(page, `e2e-ai-prompt-save-${Date.now()}`, "3 月 1 日:张三完成接口联调。");
await mockAiGeneration(page, "- 3 月 1 日:接口联调完成(张三)");
@@ -160,14 +162,14 @@ test.describe("AI custom prompts", () => {
const dialog = await openMemoAssistant(page, memo.id, notebookName);
await selectAction(dialog, "自定义指令");
await dialog.locator("textarea").fill(instruction);
- await dialog.getByRole("button", { name: "保存为提示词", exact: true }).click();
+ await dialog.getByRole("button", { name: "保存为指令", exact: true }).click();
- const saveDialog = page.getByRole("dialog", { name: "保存为提示词" });
+ const saveDialog = page.getByRole("dialog", { name: "保存为指令" });
await expect(saveDialog).toBeVisible();
await saveDialog.getByPlaceholder("例如:周报提炼").fill(promptName);
await saveDialog.getByRole("button", { name: "创建", exact: true }).click();
await expect(saveDialog).toBeHidden();
- await expect(dialog.getByText("提示词已保存。", { exact: true })).toBeVisible();
+ await expect(dialog.getByRole("combobox", { name: "处理方式" })).toHaveText(promptName);
await login(request);
const prompts = await listPrompts(request);
@@ -184,7 +186,7 @@ test.describe("AI custom prompts", () => {
test("updates and deletes a custom prompt from settings", async ({ page, request }) => {
await login(request);
- const originalName = `e2e-更新提示词-${Date.now()}`;
+ const originalName = `e2e-更新指令-${Date.now()}`;
const updatedName = `${originalName}-已改`;
const created = await createPrompt(request, {
name: originalName,
@@ -194,11 +196,11 @@ test.describe("AI custom prompts", () => {
createdPromptIds.push(created.id);
await openSettingsAiTab(page);
- const row = page.locator("div").filter({ hasText: originalName }).filter({ has: page.getByRole("button", { name: "编辑提示词" }) }).first();
+ const row = page.getByRole("article").filter({ has: page.getByRole("heading", { name: originalName, exact: true }) });
await expect(row.getByText(originalName, { exact: true })).toBeVisible();
- await row.getByRole("button", { name: "编辑提示词", exact: true }).click();
+ await row.getByRole("button", { name: "编辑指令", exact: true }).click();
- const editor = page.getByRole("dialog").filter({ hasText: "编辑提示词" });
+ const editor = page.locator("form").filter({ has: page.getByRole("heading", { name: "编辑指令", exact: true }) });
await expect(editor).toBeVisible();
await editor.getByPlaceholder("例如:周报提炼 / 会议待办").fill(updatedName);
await editor.locator("textarea").fill("更新后的指令:提取风险与应对。");
@@ -206,10 +208,10 @@ test.describe("AI custom prompts", () => {
await expect(editor).toBeHidden();
await expect(page.getByText(updatedName, { exact: true })).toBeVisible();
- const updatedRow = page.locator("div").filter({ hasText: updatedName }).filter({ has: page.getByRole("button", { name: "删除" }) }).first();
+ const updatedRow = page.getByRole("article").filter({ has: page.getByRole("heading", { name: updatedName, exact: true }) });
await updatedRow.getByRole("button", { name: "删除", exact: true }).click();
const deleteConfirm = page.getByRole("dialog").filter({ hasText: updatedName });
- await expect(deleteConfirm.getByText(/确定删除提示词/)).toBeVisible();
+ await expect(deleteConfirm.getByText(/确定删除指令/)).toBeVisible();
await deleteConfirm.getByRole("button", { name: "删除", exact: true }).click();
await expect(page.getByText(updatedName, { exact: true })).toHaveCount(0);
@@ -221,7 +223,7 @@ test.describe("AI custom prompts", () => {
test("uses a saved prompt from the assistant dropdown for generation", async ({ page, request }) => {
await login(request);
- const promptName = `e2e-选用提示词-${Date.now()}`;
+ const promptName = `e2e-选用指令-${Date.now()}`;
const created = await createPrompt(request, {
name: promptName,
instruction: "只输出三条关键结论。",
@@ -233,7 +235,7 @@ test.describe("AI custom prompts", () => {
const dialog = await openMemoAssistant(page, memo.id, notebookName);
await selectAction(dialog, promptName);
- await expect(dialog.locator("textarea")).toHaveValue("只输出三条关键结论。");
+ await expect(dialog.getByRole("combobox", { name: "处理方式" })).toHaveText(promptName);
await dialog.getByRole("button", { name: "生成", exact: true }).click();
await expect(dialog.getByText("进展顺利")).toBeVisible();
await expect(dialog.getByText("风险可控")).toBeVisible();