Repository navigation
feat(desktop): 插件设置区域的工具行可作工具选择器,在原处选择工具链安装 - #2312
Merged
Merged
Conversation
- Core 固定到 Lithe-core-rust#174 分支提交 a50cea1:choose 是 ui 0 内的可选字段, 能力版本不变,pluginhost 仍声明 ui 0 - pluginview 节点读取 choose,SettingsHost.Tool 带上 choose - 设置区域的 tool 行带 choose 时画成选择框,点开后用浮层列出工具链页的同一份选项, 选中值写进设置窗口的工具链草稿,按应用/确定保存,取消丢弃 - tool 行跳到工具链页时沿用插件页的全局/项目作用域 - 新增 i18n 词条“在‘工具链’中管理…”、无头测试和中英文截图,更新功能矩阵
xiaoyumuxi
marked this pull request as ready for review
November 22, 2026 16:09
13 of 16 tasks
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 22, 2026
This was referenced Nov 23, 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
插件设置区域里的工具行(
{"type":"tool","tool":"…"})只显示当前作用域解析到的安装,点一下就离开插件页、跳到“设置 › 工具链”。按项目选解释器或 SDK 的语言插件(第一个是 #2122 的 Python 插件)没法提供 PyCharm 解释器下拉框那样就地选择的体验。Core 契约在 Lithe-IDEA/Lithe-core-rust#174 给
tool行加了可选布尔字段choose。它是ui0 内的补充,不升能力版本:宿主仍声明ui0,插件清单仍写requires.ui: 0。本 PR 是桌面端接入。改动 / Changes
工具选择器(
desktop/internal/settingswindow/plugin_region_view.go)tool行带choose: true时,画成带边框和下拉箭头的选择框;点开后用 Viva 浮层(ui.PopoverWith,宽 560、列表最高 320)在原处列出“工具链”页对这个工具的同一份选项:toolchainOption、toolchainAddRow,没有另写一份。选中后只改设置窗口的工具链草稿(scope.draft),按“应用/确定”保存,按“取消”丢弃,和“工具链”页一致;选中后浮层自动关闭,行上显示待提交的选择。regionSettings.toolScope);打开浮层时把“工具链”页切到同一作用域,两边看到的是同一份草稿。ManagedOnly)没有可选项,带choose也仍是普通链接行。不带
choose的工具行(行为变化)t.current()),在项目设置里点开可能落到全局页。插件视图(
desktop/internal/pluginview)node.go:节点读取choose。render.go:SettingsHost.Tool(c, tool, choose)把它传给设置窗口。Core 固定版本(
scripts/desktop/build-desktop-core.sh)PINNED_CORE_REVISION固定到 fix(mac): reduce editor file-open lag #174 分支提交 a50cea1;fix(mac): reduce editor file-open lag #174 合入后换成 main 上的提交。文案、矩阵与文档
shared/i18n/features/plugin-views.json新增desktop.pluginView.toolPickerToolchains(“在‘工具链’中管理…” / “Manage in Toolchains…”),重新生成shared.generated.go。plugin-registered-settings-pages补充工具选择器和作用域变化,两端验证保持pending。docs/development/macos-plugin-api-plan.md的 API-13 状态写上工具选择器。测试
TestRegionToolPickerChoosesIntoTheToolchainDraft:“工具链”页停在项目作用域时,从全局插件页点开选择框,“工具链”页切到全局;选一个安装后只写进全局草稿,浮层关闭;按“应用”前不写入,按“应用”后写入固定的安装、草稿清空。“取消”沿用工具链页已有的丢弃草稿逻辑,这里没有单独测。TestRegionToolRowOpensTheToolchainsPage:浮层里的“在‘工具链’中管理…”和不带choose的行,都跳到“工具链”页并选中这个工具,作用域沿用插件页,浮层不残留。TestVisualPluginRegion扩展为中英文 × 明暗主题,各拍区域和展开后的选择器。截图 / Screenshots
区域里的工具选择框(英文、深色):
展开后的选项(英文、深色):
展开后的选项(中文、浅色):
不在本 PR 范围内 / Out of scope
choose:在插件仓库做,等包含本改动的桌面端发布后再写(旧宿主的 Core 不认识choose,会拒绝带它的视图)。click里用工作区上下文调用run/start实现,宿主不需要改动;fix(mac): reduce editor file-open lag #174 只在契约里写明视图调用带工作区上下文。类型专属:feat
多平台对齐
pending)platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/plugin-registered-settings-pages.json:补充工具选择器和不带choose的行沿用插件页作用域,证据写到两个测试和截图;没有运行整机验收,两端验证保持pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(221 项通过)和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD(通过).artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空ui/view-panel.plugin.json和测试里内联的合成工具(fixtureTool),没有读取具体插件,没有使用真实插件 IDshared/i18n/;新增的词条是宿主浮层里的链接choose是新的可选字段,不写它的已发布插件行为只差不带choose的行跳转时沿用插件页作用域UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=… scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' -run TestVisualPluginRegion -count=1 ./internal/settingswindow,提交 c15e0b5,设置窗口插件详情的“设置”页签,英文/中文 × 深色/浅色,各拍区域和展开的选择器,共 8 张,窗口高 1180docs/assets/plugin-settings-tool-picker/)统一日志系统 / Structured logging
N/A:只是设置窗口里的界面交互,选中值进已有的工具链草稿,保存沿用工具链页已有的路径和日志。
界面文案 / i18n
shared/i18n/features/plugin-views.json补齐中英词条,运行node scripts/i18n/generate-i18n.mjs并提交生成结果;Viva 代码通过i18n.Shared读取shared/i18n/node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,没有放宽脚本或扩大豁免名单逻辑归属 / Logic placement
choose的校验在 Core(feat(plugin-ui): 设置区域工具行新增可选字段 choose 作工具选择器(ui 0 内补充),视图调用带工作区上下文写进契约 Lithe-IDEA/Lithe-core-rust#174 的plugin-ui/src/tree.rs,契约和 fixture 同一个 PR);工具的可选安装、自动值和生效值来自 Core 已有的工具链解析结果,桌面端只做呈现,复用工具链页的同一套行组件性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存或依赖;浮层只在点开时绘制,选项来自已经加载的工具链快照。
设置 / Settings
插件契约 / Plugin contract
ui0 内的补充,API-13、API-23);链接:feat(plugin-ui): 设置区域工具行新增可选字段 choose 作工具选择器(ui 0 内补充),视图调用带工作区上下文写进契约 Lithe-IDEA/Lithe-core-rust#174scripts/desktop/build-desktop-core.sh的PINNED_CORE_REVISION已升到包含该契约的 Core commit(fix(mac): reduce editor file-open lag #174 分支 a50cea1,合入后换成 main 提交),桌面端测试经scripts/desktop/desktop-go.sh读到的就是这份契约sdk-e2e.mjs:没有改后端协议,choose只是视图结果里的字段ui0choose是 API-13 插件视图里 API-23 工具解析的就地选择发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh(通过)无用代码与重构 / Dead code and refactoring
revealTool,选择器和链接行共用)验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/settingswindow ./internal/pluginview ./internal/pluginhost(Core a50cea1)scripts/desktop/desktop-go.sh vet ./internal/settingswindow ./internal/pluginview ./internal/pluginhostgofmt -l desktop/internal/settingswindow desktop/internal/pluginview desktop/internal/pluginhostTestVisualPluginRegion(-tags 'vivahead lithevisual',8 张截图)node scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh、verify-platform-feature-matrix-change.sh origin/main HEAD./scripts/desktop/verify/verify-runtime-bundle-immutability.shdevelop-lithe第三节)未能执行的检查和原因:
pending。提交前确认 / Final checks
main(dc4bfdde7)创建,目标分支为main.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图