Repository navigation
fix(plugin-ui): 撤回 ui 1,设置区域工具行的 choose 改为 ui 0 内的可选字段 - #175
Merged
Merged
Conversation
xiaoyumuxi
marked this pull request as ready for review
November 22, 2026 16:10
This was referenced Nov 22, 2026
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.
背景
#174 合入
main的是早一版的提交,里面把工具选择器做成了新能力版本ui1:capabilities.rs里UI变成[0, 1],清单 schema 的requires.ui允许 1,能力对照表和“按协议查首次出现”也加了ui1。PR 合入后才推送的改动不在main上,那版改动把choose定为ui0 内的可选字段。能力版本不随意升:新增可选字段留在现有版本内。这个 PR 把改动补进main。ui1 没有随任何宿主发布过(桌面端main固定的 Core 还在 #174 之前)。改动
capabilities.rs:UI回到&[0],说明里去掉“Version 1 adds the tool picker”。plugin-manifest.schema.json:requires.ui回到enum [0]。plugin-ui.schema.json的toolRow和choose说明去掉requires.ui 1。plugin-ui/src/tree.rs:去掉“requires.ui为 0 时拒绝choose”的检查。choose仍然只接受布尔值,不是布尔值时以plugin.ui.invalidView拒绝,位置指向choose。plugin-manifest/src/views.rs、plugin-ui/src/lib.rs的测试改成清单写requires.ui: 0时接受选择器。ui/view-results.json有两个用例:接受选择器、choose不是布尔值时拒绝。这两个用例替换原来“requires.ui为 0 时拒绝”的用例。reference/domains/ui.md、reference/domains/settings.md(中英)都改成ui0 的写法,并写明旧宿主的 Core 不认识choose、会拒绝带它的视图,插件要等包含本改动的桌面端发布后再写。capabilities-and-versions.md中英两张表删去ui1 一行。ui0 内的补充);ui1 已由本 PR 撤回;ui1 一行。宿主方法
验证
cargo test -p lithe-plugin-ui -p lithe-plugin-manifest -p lithe-plugin-model:全部通过。cargo test -p lithe-core plugin_views:4 个通过,含读取view-results.json的 fixture 测试。cargo clippy -p lithe-plugin-ui -p lithe-plugin-manifest -p lithe-plugin-model --all-targets -- -D warnings、cargo fmt --all --check。node shared/plugins/scripts/verify-docs.mjs、node scripts/rust-core/verify-platform-tests.mjs、scripts/rust-core/verify-rust-core-comments.sh。shared/plugins/sdk/node:npm run test:types。桌面端接入(1lck/Lithe-IDEA#2312)改为固定本 PR 合入后的
main提交,宿主继续声明ui0。