Repository navigation
feat(run): support model-generated declared runConfigurationTypes entries - #2382
Merged
Merged
Conversation
xiaoyumuxi
marked this pull request as ready for review
November 24, 2026 08:36
12 tasks done
This was referenced Nov 24, 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 / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
当构建系统插件同时声明了自定义运行配置类型(
buildSystems[].runConfigurationTypes)和从模型自动发现的运行入口(buildSystems[].run[])时,运行/调试配置对话框会把自动发现的条目放入单独的通用构建分组(扳手图标),与用户手动新建的声明类型分组(自定义 SVG 图标和结构化表单)分裂成两套类型。配套 Rust Core PR Lithe-IDEA/Lithe-core-rust#196(在
runConfigurationTypes: 0内做向后兼容补充,不提升能力版本),本 PR 让桌面端把模型解码出的build.run-type运行条目送入runConfig.generate生成层,并在构建树目标启动时复用对应的生成配置,使自动发现目标与手动新建配置共用同一分组、图标、编辑器表单和build.runConfigurationPlan启动流程。改动 / Changes
desktop/internal/core/build.go:新增RunTypeReference结构;为BuildRunEntry增加可选字段Provider与RunType。desktop/internal/core/run_config.go:扩展RunProviderRun,Reference改为指针并可选,同时支持CWD、Execution、Selector、RunType以传递生成的build.run-type快照条目;同步更新desktop/internal/core/run_config_test.go与desktop/internal/core/run_discovery_test.go中的现有调用。desktop/internal/workbench/runconfig.go:providerRuns除了收集build.provider运行声明外,也收集instance.Model.Run中带RunType的条目并规范化其工作区相对ProjectPath与CWD;新增generatedRunTypeConfigurationID查找对应的已解析生成层build.run-type配置。desktop/internal/workbench/build.go:runBuildEntry在目标条目携带RunType时改走对应生成的build.run-type运行配置,避免用空Arguments启动裸命令。desktop/internal/pluginhost/pluginhost.go:更新Declared()上方runConfigurationTypes注释说明,能力版本保持0不变。shared/platform-feature-matrix/features/run-plugin-declared-types.json:补充buildSystems[].run[].configurationType生成配置说明、验证步骤与自动化测试证据。desktop/internal/core/run_config_test.go:新增TestGeneratedRunTypeSnapshotResolvesAsDeclaredKind,验证生成层build.run-type条目解析为generated:run-type:*且携带声明的RunTypeKey。desktop/internal/workbench/runconfig_test.go:新增TestGeneratedRunTypeSharesDialogGroupWithUserConfiguration,验证模型发现的生成条目与用户手动新建的同类型配置在运行/调试配置对话框中归入同一个分组。不在本 PR 范围内 / Out of scope
scripts/desktop/build-desktop-core.sh的PINNED_CORE_REVISION不变(当前指向合并了#187增量市场依赖的集成提交);待 Lithe-IDEA/Lithe-core-rust#196 合入后更新PINNED_CORE_REVISION再取消 Draft。类型专属:feat
多平台对齐
范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/run-plugin-declared-types.json:两端的实现状态和验证状态、证据路径、owner、验证动作都如实填写;没有运行验证的保持pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh;改了平台实现路径的,还运行了./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD.artifacts/下生成的矩阵视图插件归属 / Plugin ownership
dev.example.tasker);没有读取具体插件包、仓库检出、构建产物或清单,没有使用真实插件 IDshared/i18n/;插件的构建步骤、资源路径和补丁没有写进docs/ci-builds.md、Agent Note 或 SkillrunConfigurationTypes保持版本0向后兼容UI 验证 / UI evidence
N/A:未修改布局、控件、样式、文案、菜单或弹窗代码,复用了现有
runConfigKindOf/runConfigDialog对build.run-type的分组与渲染路径。统一日志系统 / Structured logging
N/A:未新增或改动日志事件、生命周期里程碑或通道;失败路径复用既有的
operationRejected("build_run_entry", "target_missing")。界面文案 / i18n
shared/i18n/node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check逻辑归属 / Logic placement
性能与内存 / Performance and memory
N/A:未新增后台进程、缓存、定时器、轮询或大内存结构;只在既有模型加载后的
providerRuns快照组装阶段遍历一次instance.Model.Run。设置 / Settings
N/A:未修改设置页或设置项。
插件契约 / Plugin contract
scripts/desktop/build-desktop-core.sh的PINNED_CORE_REVISION已升到包含该契约的 Core commit(保持 Draft,待 Core PR fix(windows): restore bundled JDTLS startup and Java navigation #196 合入后更新 pin 并重跑 CI)node shared/plugins/scripts/sdk-e2e.mjs:未修改插件后端协议或 SDK发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.shdocs/ci-builds.md写清:未新增资源或缓存路径无用代码与重构 / Dead code and refactoring
验证 / Verification
LITHE_CORE_RUST_DIR=... scripts/desktop/desktop-go.sh test -count=1 ./internal/pluginhost ./internal/core ./internal/workbench -run 'TestProviderRuns|TestRunConfiguration|TestGeneratedRunType|TestGenerateRunConfigurations|TestDeclared|TestRunConfig|TestCapabilities'LITHE_CORE_RUST_DIR=... scripts/desktop/desktop-go.sh vet ./..../scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEADnode scripts/i18n/verify-app-language-localization.mjs && node scripts/i18n/generate-i18n.mjs --checkscripts/desktop/verify/verify-runtime-bundle-immutability.sh未能执行的检查和原因:
pending。PINNED_CORE_REVISION尚未切换至 Core PR fix(windows): restore bundled JDTLS startup and Java navigation #196(因需先合入 Core PR fix(windows): restore bundled JDTLS startup and Java navigation #196 并避免覆盖当前 pin 依赖的#187增量市场提交),本 PR 以 Draft 提交。提交前确认 / Final checks
main创建;目标分支:main.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图