Add localized engine render config API#557
Open
Changdw wants to merge 2 commits into
Open
Conversation
yanOO1497
reviewed
May 13, 2026
| @title('Get Engine Render Config') | ||
| @description('Get translated render-config.json data from the current engine repository for project settings rendering configuration display.') | ||
| @result(SchemaRenderConfigResult) | ||
| async getRenderConfig(): Promise<CommonResultType<TRenderConfigResult>> { |
Contributor
There was a problem hiding this comment.
要暴露在 lib 而不是 API 层,这个 API 层没啥用,而且这个不需要暴露在 mcp 里加重 tools 负担,纯粹 PinK 需要而已
yanOO1497
reviewed
May 13, 2026
| import { COMMON_STATUS } from '../src/api/base/schema-base'; | ||
| import { EngineApi } from '../src/api/engine/engine'; | ||
|
|
||
| describe('EngineApi', () => { |
Contributor
There was a problem hiding this comment.
应该测 lib/engine 里的接口 ,实际上 CLI 里的 API 层现在是一个待废弃的设计。只需要 mcp 层就行了。
yanOO1497
reviewed
May 13, 2026
| } | ||
|
|
||
| if (typeof value === 'string') { | ||
| return translateRenderConfigText(value, localization) as T; |
Contributor
There was a problem hiding this comment.
目前 CLI 还缺失一个步骤是关于 engine 模块默认值的获取,需要从 render config 里解析出来默认值作为 CLI engine 裁切设置的默认值。现在写死的是因为还没有对接。
Contributor
Author
|
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.
core/engine新增翻译版 render-config 查询能力:getLocalizedEngineRenderConfig()Engine.queryLocalizedRenderConfig()editor/engine-features/render-config.json,并按当前语言把其中的i18n:文案展开成可直接展示的文本engine-get-render-config/EngineApi.getRenderConfig(),返回项目设置可直接使用的渲染配置数据queryRenderConfig()原始读取能力,避免影响现有调用方