From c2a975af9e21bad32092b663875742136e48693d Mon Sep 17 00:00:00 2001 From: xuhd Date: Fri, 15 May 2026 16:41:44 +0800 Subject: [PATCH] =?UTF-8?q?@=20feat(i18n):=20=E5=85=A8=E5=B1=80=E5=B0=86?= =?UTF-8?q?=E3=80=8C=E4=B8=93=E5=AE=B6=E3=80=8D=E6=96=87=E6=A1=88=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E3=80=8C=E6=99=BA=E8=83=BD=E4=BD=93=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一智能体功能的 UI 文案:侧边栏、智能体页、新建/保存流程、 审批卡片、登录提示及后端审批消息中的「专家」均改为「智能体」。 保留 prompt 人设、QA 子应用等非该功能语义的「专家」表述。 Co-Authored-By: Claude Opus 4.7 (1M context) @ --- .../workspace/messages/message-list.tsx | 4 +- frontend-web/src/core/i18n/locales/en-US.ts | 6 +-- frontend-web/src/core/i18n/locales/zh-CN.ts | 46 +++++++++---------- .../src/hooks/useExpertAuthBootstrap.ts | 2 +- frontend-web/src/pages/LoginPage.tsx | 2 +- frontend-web/src/pages/NewAgentPage.tsx | 24 +++++----- .../setup_agent_approval_middleware.py | 2 +- 7 files changed, 43 insertions(+), 43 deletions(-) diff --git a/frontend-web/src/components/workspace/messages/message-list.tsx b/frontend-web/src/components/workspace/messages/message-list.tsx index 0570ca12..6c6a745f 100644 --- a/frontend-web/src/components/workspace/messages/message-list.tsx +++ b/frontend-web/src/components/workspace/messages/message-list.tsx @@ -358,9 +358,9 @@ function SetupAgentApprovalCard({
- 创建专家审批 + 创建智能体审批
-
请确认是否写入这个专家配置。
+
请确认是否写入这个智能体配置。
{approvalPayload.name ? ( diff --git a/frontend-web/src/core/i18n/locales/en-US.ts b/frontend-web/src/core/i18n/locales/en-US.ts index 20783549..f08cd332 100644 --- a/frontend-web/src/core/i18n/locales/en-US.ts +++ b/frontend-web/src/core/i18n/locales/en-US.ts @@ -177,10 +177,10 @@ export const enUS: Translations = { // Agents agents: { - title: "Experts", + title: "Agents", description: - "Create and manage custom experts with specialized prompts and capabilities.", - newAgent: "New Expert", + "Create and manage custom agents with specialized prompts and capabilities.", + newAgent: "New Agent", emptyTitle: "No custom agents yet", emptyDescription: "Create your first custom agent with a specialized system prompt.", diff --git a/frontend-web/src/core/i18n/locales/zh-CN.ts b/frontend-web/src/core/i18n/locales/zh-CN.ts index bc3650c8..8d89e50f 100644 --- a/frontend-web/src/core/i18n/locales/zh-CN.ts +++ b/frontend-web/src/core/i18n/locales/zh-CN.ts @@ -89,7 +89,7 @@ export const zhCN: Translations = { reasoningModeDescription: "思考后再行动,在时间与准确性之间取得平衡", proMode: "专业问答", proModeDescription: "思考、计划再执行,获得更精准的结果,可能需要更多时间", - ultraMode: "多专家问答", + ultraMode: "多智能体问答", ultraModeDescription: "继承自专业问答模式,可调用子代理分工协作,适合复杂多步骤任务,能力最强", reasoningEffort: "推理深度", @@ -165,47 +165,47 @@ export const zhCN: Translations = { chats: "对话", recentChats: "最近的对话", demoChats: "演示对话", - agents: "专家", + agents: "智能体", users: "用户管理", }, // Agents agents: { - title: "专家", - description: "创建和管理具有专属 Prompt 与能力的自定义专家。", - newAgent: "新建专家", - emptyTitle: "还没有自定义专家", - emptyDescription: "创建你的第一个自定义专家,设置专属系统提示词。", + title: "智能体", + description: "创建和管理具有专属 Prompt 与能力的自定义智能体。", + newAgent: "新建智能体", + emptyTitle: "还没有自定义智能体", + emptyDescription: "创建你的第一个自定义智能体,设置专属系统提示词。", chat: "对话", delete: "删除", - deleteConfirm: "确定要删除该专家吗?此操作不可撤销。", - deleteSuccess: "专家已删除", + deleteConfirm: "确定要删除该智能体吗?此操作不可撤销。", + deleteSuccess: "智能体已删除", newChat: "新对话", - createPageTitle: "设计你的专家", - createPageSubtitle: "描述你想要的专家,我来帮你通过对话创建。", - nameStepTitle: "给新专家起个名字", + createPageTitle: "设计你的智能体", + createPageSubtitle: "描述你想要的智能体,我来帮你通过对话创建。", + nameStepTitle: "给新智能体起个名字", nameStepHint: "只允许字母、数字和连字符,存储时自动转为小写(例如 code-reviewer)", nameStepPlaceholder: "例如 code-reviewer", nameStepContinue: "继续", nameStepInvalidError: "名称无效,只允许字母、数字和连字符", - nameStepAlreadyExistsError: "已存在同名专家", + nameStepAlreadyExistsError: "已存在同名智能体", nameStepNetworkError: "网络请求失败,请检查网络或后端连接", nameStepCheckError: "无法验证名称可用性,请稍后重试", nameStepBootstrapMessage: - "新专家的名称是 {name},现在开始为它生成 **SOUL**。", - save: "保存专家", - saving: "正在保存专家...", + "新智能体的名称是 {name},现在开始为它生成 **SOUL**。", + save: "保存智能体", + saving: "正在保存智能体...", saveRequested: - "已提交保存请求,CM 助手 正在根据当前对话生成并保存初版专家。", + "已提交保存请求,CM 助手 正在根据当前对话生成并保存初版智能体。", saveHint: - "你可以在右上角的菜单里随时保存这个专家,就算目前还只是初稿也可以。", + "你可以在右上角的菜单里随时保存这个智能体,就算目前还只是初稿也可以。", saveCommandMessage: "请现在根据我们目前已经讨论的全部内容保存这个自定义专家。这就是我明确的保存确认。如果仍有少量细节缺失,请根据上下文做出合理假设,生成一份简洁的英文初始 SOUL.md,并直接调用 setup_agent,不要再向我索要额外确认。", agentCreatedPendingRefresh: - "专家已创建,但 CM 助手 暂时还无法读取到它。请稍后刷新当前页面。", + "智能体已创建,但 CM 助手 暂时还无法读取到它。请稍后刷新当前页面。", more: "更多操作", - agentCreated: "专家已创建!", + agentCreated: "智能体已创建!", startChatting: "开始对话", backToGallery: "返回 Gallery", }, @@ -452,7 +452,7 @@ export const zhCN: Translations = { pinSuccess: "已钉选", unpinSuccess: "已取消钉选", deleteAction: "删除技能", - deleteConfirm: "确认删除技能 “{name}”?该操作不可恢复,且会从引用它的所有专家中自动移除。", + deleteConfirm: "确认删除技能 “{name}”?该操作不可恢复,且会从引用它的所有智能体中自动移除。", deleteSuccess: "技能已删除", stateSheet: { archivedTitle: "归档的技能", @@ -583,12 +583,12 @@ export const zhCN: Translations = { adminUsers: { title: "用户管理", - description: "查看所有注册用户及其关联的技能和专家数量。", + description: "查看所有注册用户及其关联的技能和智能体数量。", email: "邮箱", role: "角色", userId: "用户 ID", skillCount: "技能数", - agentCount: "专家数", + agentCount: "智能体数", roleAdmin: "管理员", roleUser: "普通用户", empty: "暂无用户", diff --git a/frontend-web/src/hooks/useExpertAuthBootstrap.ts b/frontend-web/src/hooks/useExpertAuthBootstrap.ts index 5dfa0b9d..9186025c 100644 --- a/frontend-web/src/hooks/useExpertAuthBootstrap.ts +++ b/frontend-web/src/hooks/useExpertAuthBootstrap.ts @@ -93,7 +93,7 @@ export function useExpertAuthBootstrap() { useEffect(() => { void bootstrap().catch((error) => { - console.error('专家中心初始化失败:', error); + console.error('智能体中心初始化失败:', error); }); }, [bootstrap]); diff --git a/frontend-web/src/pages/LoginPage.tsx b/frontend-web/src/pages/LoginPage.tsx index fce89afa..559b6a83 100644 --- a/frontend-web/src/pages/LoginPage.tsx +++ b/frontend-web/src/pages/LoginPage.tsx @@ -54,7 +54,7 @@ export default function LoginPage() { return (
-

正在进入专家模式

+

正在进入智能体模式

{status === "error" && (

登录失败:{errorMessage || "未知错误"} diff --git a/frontend-web/src/pages/NewAgentPage.tsx b/frontend-web/src/pages/NewAgentPage.tsx index 3ac5d4f2..4baed8ab 100644 --- a/frontend-web/src/pages/NewAgentPage.tsx +++ b/frontend-web/src/pages/NewAgentPage.tsx @@ -153,7 +153,7 @@ export default function NewAgentPage() { // the user wants the name box to stay blank while they chat, and we // refill it later (with the model's proposed name) on setup_agent // approval. - name = `未命名专家-${Date.now().toString(36)}`; + name = `未命名智能体-${Date.now().toString(36)}`; } const modelOverride = modelInput.trim() || null; @@ -226,7 +226,7 @@ export default function NewAgentPage() { if (!saved) { return; } - toast.success(`专家「${saved.name}」已保存`); + toast.success(`智能体「${saved.name}」已保存`); }, [ensureAgent]); const handleChatSubmit = useCallback( @@ -270,7 +270,7 @@ export default function NewAgentPage() { const handleRejectSetupAgent = useCallback( async () => { - await handleChatSubmit("我暂时不批准创建这个专家配置,请继续帮我调整。"); + await handleChatSubmit("我暂时不批准创建这个智能体配置,请继续帮我调整。"); }, [handleChatSubmit], ); @@ -300,7 +300,7 @@ export default function NewAgentPage() { > -

创建专家

+

创建智能体

{agent ? (