Repository navigation
Conversation
- WebUiContribution.configGroups 改为 (language) => ConfigGroup[],与 World 的 webUi(language).config、Core 的 coreConfigGroup(language) 同形;组 id 与配置键不随语言变化。 - Persona 页按请求语言取组;/api/config 同一份。dry-mount 只查路径,取 en。 - 静态组写成 () => [...];下游 bot 交数组的要改成函数。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 根因:组的标题和说明只写了中文,contextStageConfigGroup 不接语言,任何界面语言都显示中文。 现在接 language,用 pick 取 11 种语言的文案;Cormini 与 CortiV 都按请求语言交组。 - 说明里的页名从旧的「语言模型」改为现名「模型供应商」,各语言取该页 navLabel。 - tests/cormini/config.test.ts:每种语言文案各不相同,组 id、配置键与取值范围在各语言一致。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| /** 追加的可调配置组(Persona那组;core 与各 World 的由框架收拢) */ | ||
| configGroups?: ConfigGroup[]; | ||
| /** 追加的可调配置组(Persona那组;core 与各 World 的由框架收拢),文案使用请求语言;组 id 与配置键不随语言变化。 */ | ||
| configGroups?(language: Language): ConfigGroup[]; |
There was a problem hiding this comment.
文档所有权未更新。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[] 改成 (language: Language) => ConfigGroup[](本行)。请把这一契约写进上述页面,或者在 PR 说明里写明为什么这次不改文档。
— Cortico PR Gate via Cursor Cloud Agent
| * 上下文与交接容量配置归Persona,WebUI 表单与 bots/cormini/persona/config.ts 共用。 | ||
| */ | ||
| export const CORTIV_CONTEXT_CONFIG_GROUP: ConfigGroup = contextStageConfigGroup('cortiv'); | ||
| export function cortivContextConfigGroup(language: Language): ConfigGroup { |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Persona 页「上下文与交接」这组(阶段预算、交接保留比例、软阈值比例、合成首轮对话)的标题和说明只写了中文,任何界面语言都显示中文。现在按请求语言返回,11 种语言齐全。
改动
WebUiContribution.configGroups改为(language) => ConfigGroup[],与 World 的webUi(language).config、coreConfigGroup(language)同形;组 id 与配置键不随语言变化。Persona 页和/api/config都按请求语言取组。contextStageConfigGroup(id, language)用pick取文案;Cormini、CortiV 按请求语言交组。CortiV 的导出常量改为cortivContextConfigGroup(language)。tests/cormini/config.test.ts:每种语言文案各不相同;各语言的组 id、配置键与取值范围一致。下游要跟的改动
交静态数组的 bot 要改成函数。Coopanion
core/companion.ts现在是configGroups: [base.contextGroup, settingsGroup],contextStageConfigGroup('cormini')只调一次;升级 vendor 后改为configGroups: (language) => [contextStageConfigGroup('cormini', language), companionGroup(language)],原来靠Object.assign(settingsGroup, …)换语言的写法可以去掉。验证
pnpm test(288 个文件)、pnpm run typecheck、pnpm typecheck:web通过。/api/config?language=<11 种>逐一返回对应语言。pnpm dev:webui没法验:它的 Persona 页不声明配置组,没有配置页签;/api/config也不看请求语言,所有组只给中文。没动的
corti-soulmate的PERSONA_CONFIG_GROUP和 CortiV 的CORTIV_COGNITION_CONFIG_GROUP仍只有中文,这次只把它们改成函数形式。🤖 Generated with Claude Code