Repository navigation
feat(run): 当前文件运行——构建插件按文件找入口,保存为运行配置后运行 - #2123
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
marked this pull request as ready for review
November 18, 2026 03:18
This was referenced Nov 18, 2026
15 of 18 tasks
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 18, 2026
- 标题栏运行下拉的“新建运行配置…”“编辑运行配置…”、构建窗口列表头的 + 和列表的编辑按钮, 都打开新的“运行/调试配置”对话框:左侧 + − 复制工具栏和按类型分组的配置树,右侧是选中配置的 编辑器,底部是 运行 / 取消 / 应用 / 确定。去掉标题栏的“新建运行配置 >”子菜单和构建窗口的新建菜单。 - 对话框里可以同时新建、修改、删除多个配置:应用先删除再按树的顺序保存,失败时停在出错的配置上; 确定保存并关闭;取消丢弃全部改动;运行保存后关闭并启动选中的配置。复制生成“<原名>(副本)”。 - 插件运行的编辑器并入对话框右侧,不再单独弹窗。两种编辑器都保留启动前步骤列表, 步骤的添加、移动、移除算作修改,由应用 / 确定 / 运行一并保存。 - 脚本选项、解释器路径、解释器选项加占位说明和 ⓘ,写清各自传给谁。 - cmd 批处理在所有平台都能新建、编辑、保存;不在 Windows 上时编辑器顶部提示只能在 Windows 上运行, 配置树标警告图标,对话框的“运行”置灰,标题栏运行按钮变灰、按下只提示原因,运行下拉标“仅 Windows”。 - Core 改动是 Lithe-core-rust#87(已合入 Core main 6f5fbcc),main 现在固定的 Core 5c48a67 已包含它: 批处理在非 Windows 上能列出、编辑、保存,不作为启动前步骤候选,项目文件引用它时以 unavailable 拒绝。 build-desktop-core.sh 只补 #87、#90 的说明,不换固定版本。 - 补中英 i18n 词条、对话框和批处理测试、无头截图(含 #2123 的运行下拉截图)、Agent Note 和功能矩阵。 - 测试隔离:命令安装测试改用私有临时目录,不再把其他测试进程的 lithe-command-install-* 当成泄漏; 对话框测试等草稿读完再按按钮。 Refs #2100
This was referenced Nov 20, 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
普通 Maven 模块里带
main方法的类,如果 POM 没写主类,就没有运行配置;选“当前文件”点运行只会提示“需要运行配置”,用户只能去改 POM。IDEA 的做法是对这个类按需生成一条 Application 配置。本 PR 让“当前文件”的运行可以直接运行文件里的入口,并把它存成可以编辑的运行配置。宿主不按语言或插件判断入口,由构建插件按文件回答。改动 / Changes
Core(Lithe-IDEA/Lithe-core-rust#89,已合入 d833d6a)
buildProviders1:构建系统可以声明入口运行{"source": "provider", "entrypoints": true}。build.runEntrypointsPlan/build.decodeRunEntrypoints:规划lithe/build/runEntrypoints请求(参数是工作区相对的文件),校验插件回答的litheRunEntrypoints文档。prepareRunPlan接受不带 target 的入口运行(入口在launchOptions.entrypoint);runConfig.createUserConfiguration接受entrypoint并作为配置身份的一部分。litheBuild1,三个 SDK 同步。宿主
scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION升到d833d6a。pluginhost/pluginhost.go:buildProviders声明[0, 1]。pluginservice/builds.go:解析entrypoints: true的运行到BuildSystemDeclaration.EntrypointRuns,不进入按目标生成的Runs。core/build_entrypoints.go(新增):PlanBuildRunEntrypoints、DecodeBuildRunEntrypoints、CreateRunEntrypointConfiguration;core/build.go的BuildPlanRequest加File,buildOutcome加Entrypoints。workbench/title_run_entrypoints.go(新增):“当前文件”点运行时:targetID为空、入口写入extensions.build-run.entrypoint),重新读取配置后在标题栏选中并运行。同一入口再次运行复用已保存的配置。workbench/title_run.go:performCurrentFileAction的运行改为调用上面的流程(调试不变)。workbench/build.go:runBuildTargetWith在targetID为空时不带 target 请求准备运行。workbench/app.go:Kernel接口加三个方法;runconfig.go:findingEntrypoint状态。desktop.title.currentFileNotRunnable改为“当前文件没有可运行的入口(例如带 main 方法的类)……”,更新描述。run-current-file-entrypoint.json,viva-title-run-debug.json中“当前文件运行尚未实现”的说明同步更新;Agent Note2026-11-18-run-current-file-entrypoint.md;截图docs/assets/run-current-file/。Maven 插件(Lithe-IDEA/lithe-plugin-maven#31,已合入):声明
main入口运行,按文件回答带main方法的类(测试源码除外),不编译。截图(暗色中文 / 亮色英文):
不在本 PR 范围内 / Out of scope
类型专属:feat
多平台对齐
.exe放置范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/run-current-file-entrypoint.json,两端 implemented,验证状态 pending;同步更新viva-title-run-debug.jsonverify-platform-feature-matrix.sh和verify-platform-feature-matrix-change.sh origin/main HEAD.artifacts/下生成的矩阵视图插件归属 / Plugin ownership
UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=… ./scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench/ -run TestVisualRunOnCurrentFile:运行后和运行配置下拉两个场景,暗色中文和亮色英文,1200×820统一日志系统 / Structured logging
performed("title.run.currentFile")、operationFailed("title_run_current_file")、operationRejected("title_run_current_file","no_entrypoint")记录,没有新的日志写法界面文案 / i18n
shared/i18n/,已运行生成器并提交生成结果verify-app-language-localization.mjs和generate-i18n.mjs --check逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
插件契约 / Plugin contract
buildProviders1、litheBuild1)PINNED_CORE_REVISION已升到包含 Core 改动的 commitsdk-e2e.mjs发行包与资源 / Bundle and resources
.lithe/run/plugin/<plugin>.local.toml,不写发行目录;已运行verify-runtime-bundle-immutability.sh无用代码与重构 / Dead code and refactoring
entrypointHarness和视觉测试共用entrypointOptions/entrypointWorkspace验证 / Verification
./scripts/desktop/desktop-go.sh test ./internal/workbench/ -run TestRunOnCurrentFile -count=3./scripts/desktop/desktop-go.sh test ./internal/workbench/ ./internal/core/ ./internal/pluginservice/ ./internal/pluginhost/ ./internal/marketplace/ -count=1./scripts/desktop/desktop-go.sh vet ./...TestVisualRunOnCurrentFile(vivahead lithevisual)node scripts/i18n/generate-i18n.mjs --check、verify-app-language-localization.mjsverify-platform-feature-matrix.sh、verify-platform-feature-matrix-change.sh origin/main HEAD./scripts/agent-notes/verify-agent-notes.sh./scripts/desktop/verify/verify-runtime-bundle-immutability.shcargo test --workspace、clippy、fmt、verify-docs.mjs、sdk-e2e.mjsnode scripts/test.mjs(真实 Maven)新增自动化测试(真实 Core + 合成构建提供者):
TestRunOnCurrentFileStartsTheEntrypointAndSavesItsConfiguration:入口运行不生成配置;打开没有入口的文件点运行,提示原因、不保存不运行;打开Main.java点运行,保存名为 Main 的配置(无 target)、在标题栏选中并运行,提供者收到launchOptions.entrypoint且没有 target;再次选“当前文件”运行,复用同一条配置。TestDeclaredServesTheBaselineOfEveryWiredCapability:buildProviders声明[0, 1]。未能执行的检查和原因: Windows 本机虚拟机验收在本轮所有 PR 合入后统一进行,结果另行报告。
提交前确认 / Final checks
main创建,目标main🤖 Generated with Claude Code