Skip to content

fix(persona): 上下文与交接配置组按页面语言显示 - #382

Open
kwk1001 wants to merge 1 commit into
mainfrom
fix/persona-config-language
Open

kwk1001 wants to merge 1 commit into
mainfrom
fix/persona-config-language

Conversation

@kwk1001

@kwk1001 kwk1001 commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Persona 页「上下文与交接」一组(上下文阶段预算、交接保留比例、软阈值比例、合成首轮对话)的标题和说明只写了中文,任何界面语言下都显示中文。Core 与 World 的配置组按请求语言生成,Persona 的 configGroups 却是固定数组,没法跟语言走。

改动

  • WebUiContribution.configGroups 可以给 (language) => ConfigGroup[];固定数组照旧可用。类型 PersonaConfigGroups 与取组的 personaConfigGroups 放在 core/config-schema.ts。
  • Persona 页的配置页签、配置读写接口与 dry-mount 都按请求语言取组;dry-mount 多检查一条:各语言给出的组 id 相同。
  • Cormini 的上下文阶段组(CortiV 共用)文案移进 bots/cormini/persona/strings*.ts,11 种语言。译文没有母语者看过。
  • CORTIV_CONTEXT_CONFIG_GROUP 仍导出,取 id 与取值范围用。

没改:corti-soulmate 的 PERSONA_CONFIG_GROUP 和 CortiV 的认知组同样只有中文,可以用同一机制另做。

验证:pnpm run typecheck、typecheck:web、pnpm test(287 个测试文件)通过。新增用例:11 种语言的组 id 与键相同,非中日语言的文案里没有汉字。

🤖 Generated with Claude Code

- Persona 的 configGroups 可以给一个按请求语言生成配置组的函数(PersonaConfigGroups,
  与 personaConfigGroups 一起放在 core/config-schema.ts);固定数组照旧可用。Persona 页、
  配置读写与 dry-mount 都按请求语言取组;dry-mount 检查各语言给出的组 id 相同。
- Cormini 的「上下文与交接」组(CortiV 共用)的标题与说明移进 persona/strings*.ts,
  11 种语言;之前只有中文,任何界面语言下都显示中文。
- CORTIV_CONTEXT_CONFIG_GROUP 仍导出,供取 id 与取值范围。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-05T06:17:50.875146Z 1d10e05 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicates #381。两个 PR 都让 Persona 页「上下文与交接」配置组按请求语言显示标题和说明。#381 更早。

— Cortico PR Gate via Cursor Cloud Agent

Open in Web View Automation 

Sent by Cursor Automation: Cortico PR Gate

Comment thread src/bot.ts
* 追加的可调配置组(Persona那组;core 与各 World 的由框架收拢)。给函数时按请求语言生成标题与说明;
* 各语言的 id 与取值范围须相同。
*/
configGroups?: PersonaConfigGroups;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档所有权未更新。src/bot.ts 是 docs/personas.md 与 bots/README.md 的 owner,这个 PR 改了它,两页都没动。

AGENTS.md §8:「The commit that changes the owner changes the page.」docs/personas.md 第一行:Owner: src/core/types.ts (Persona), src/bot.ts。bots/README.md 第一行:Owner: src/paths.ts, src/deploy.ts, src/bot.ts。

WebUiContribution.configGroups 从 ConfigGroup[] 改成 PersonaConfigGroups(本行)。请把这一契约写进上述页面,或者在 PR 说明里写明为什么这次不改文档。

— Cortico PR Gate via Cursor Cloud Agent

};
export const configEn: typeof configZh = {
title: 'Context and handoff',
description: 'The model window and the output limit per response are set on the Language model page. When the context reaches the model\'s hard limit, Core forces a handoff.',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accuracy after editing。新译文把模型窗口的配置页写成了已经不存在的名字。

AGENTS.md §4 AI slop checklist:「Accuracy after editing: Verify retained behavior, conditions, units and boundaries. Necessary consequences, error causes and recovery steps must remain accurate and specific.」

本行:The model window and the output limit per response are set on the Language model page.
同一句:strings.de.ts「Sprachmodell」、strings.es-419.ts「Modelo de lenguaje」、strings.fr.ts「Modèle de langage」、strings.it.ts「Modello linguistico」、strings.ja.ts「言語モデル」、strings.ko.ts「언어 모델」、strings.pt-BR.ts「Modelo de linguagem」、strings.ru.ts「Языковая модель」、strings.zh-Hant.ts「語言模型」。

WebUI 该页现名是「模型供应商」/Model connections(src/web/client/features/providers/strings.ts 的 navLabel)。

— Cortico PR Gate via Cursor Cloud Agent

Comment thread bots/cortiv/index.ts
* 这里取 id 与取值范围;页面上的文案按请求语言另行生成(见 configGroups)。
*/
export const CORTIV_CONTEXT_CONFIG_GROUP: ConfigGroup = contextStageConfigGroup('cortiv');
export const CORTIV_CONTEXT_CONFIG_GROUP: ConfigGroup = contextStageConfigGroup('cortiv', 'zh');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicts with #381。textual:src/bot.ts、bots/cormini/persona/config.ts、bots/cortiv/index.ts、src/extensions/dry-mount.ts。两边都改 configGroups 与 CORTIV_CONTEXT_CONFIG_GROUP 的形状,合入其中一个会让另一个对不上。

— Cortico PR Gate via Cursor Cloud Agent

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant