Repository navigation
feat(plugin-model): sourceSettings 1 支持模块列表、标签页和类型化条目列表 - #79
Merged
Merged
Conversation
- 分组布局 sidebar:来源显示为左侧导航列表,可用 parent 嵌套(最多 8 层) - 字段 section:sidebar 中为标签页,form 中为小标题,表格不接受 - 字段类型 entryList:entryKinds(file/directory/choice)、至多 4 个按条目属性列; 条目的 title/detail 只用于显示,比较和写回时忽略;新增的 choice 条目必须来自 当前可选项或原值 - SourceInput 新增 entries 草稿;effectiveDisplays 对 entryList 给出数量 - 能力表 sourceSettings 支持 [0, 1];新增 fixture settings-sources-modules.json - 契约 README、schema、能力版本表、设置指南和应用边界文档同步 Refs 1lck/Lithe-IDEA#2086 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
marked this pull request as ready for review
November 17, 2026 06:29
This was referenced Nov 17, 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.
关联 Issue
类型
feat:插件契约
sourceSettings新增版本 1改动
原生来源设置(
litheSettingsSources)只有form、table两种布局,字段只有文本、枚举、布尔和字符串/文件列表,表达不了“模块列表 + 源/路径/依赖标签页 + 带类型、有顺序、可导出的依赖”。本 PR 加入四个通用成员,宿主不需要认识任何具体工具:layout: "sidebar"parentsidebar,指向同组中更早的来源,宿主据此嵌套;最多 8 层,父来源必须在前面,所以不会成环sectionsidebar中每个不同的 section 是一个标签页(按首次出现排序),form中是小标题;表格字段不能有entryListentryKinds1–16 种(file可带扩展名过滤、directory、choice带 0–1024 个可选项),attributes至多 4 列(布尔或枚举);条目{kind,value,title?,detail?,attributes?}至多 256 个,kind+value不重复Core 规则(
rust/crates/plugin-model/src/settings/sources.rs):title/detail只用于显示:判断是否修改时忽略,写回时也不交给插件;编辑函数收到的是[{kind,value,attributes?}]。choice条目必须在该类型当前的可选项中,或是字段原本就有的条目。宿主不能写入插件没有提供的容器或模块。SourceInput新增entries草稿;effectiveDisplays对entryList给出count。sourceSettings支持[0, 1]。使用这些成员的插件声明sourceSettings: 1,只支持 0 的宿主不会安装。快照的version仍为0,版本 0 快照的含义不变。文档:契约 README(Entry lists 一节)、manifest schema 的
sourceSettings枚举、能力版本对照(中英)、设置领域指南(Module structure pages)、rust/contracts/application-boundary.md、协议更新记录。Fixture:新增
rust/fixtures/plugins/settings-sources-modules.json(虚构工具:嵌套模块、标签页、两种条目列表、属性列、只读模块)。原settings-sources.json不变,宿主现有测试不受影响。宿主方法:没有新增或修改宿主方法和通知,不需要“原计划编号 | 方法 | 用途”表。
验证
cargo test -p lithe-plugin-model --lib settingscargo test -p lithe-core --lib plugin_source_settingssourceSettings: 1的清单被只支持 0 的宿主拒绝、被支持[0,1]的宿主接受)cargo clippy -p lithe-plugin-model -p lithe-core --all-targets -- -D warnings、cargo fmt --all --checkscripts/rust-core/verify-rust-core-comments.sh plugin-modelnode scripts/rust-core/verify-platform-tests.mjsnode shared/plugins/scripts/verify-docs.mjsaffected-crates.mjs显示 Linux 需要测试整个工作区,由 Draft PR 的 Linux CI 覆盖。没有改plugin-rpc,所以不需要跑 SDK 端到端测试。后续
sidebar、标签页和entryList编辑器,并把PINNED_CORE_REVISION升到本 PR 的合并提交。.classpath并写回。🤖 Generated with Claude Code