Repository navigation
feat(core): 八组 Viva 宿主规则移进 Core(重新提交 #30 到 main) - #31
Merged
Merged
Conversation
…#30) * feat(process): processLifecycle.resolve 返回停止等待时间的默认值与上下限 gracefulStopRule 设置页读取 gracefulStopRule { defaultSeconds, minSeconds, maxSeconds },不再用三个越界值探测推导(Lithe-IDEA #1830)。规则与 resolve 共用同一组常量。 * feat(network): read proxy exclusion entries in Core network.proxyPolicy now returns exclusionRules, the exclusion entries as host, suffix, ip, cidr and local rules, and invalidExclusions, the entries with none of the forms. The contract states the exact comparison a network stack applies, addresses compared within their family and an IPv6 zone ignored, and rust/fixtures/network/proxy-bypass-v1.json pins which hosts go direct, so hosts no longer parse the entries themselves. * feat(git): git.changedFileGroups groups changed files by folder in natural order The changed-file lists of a commit, a stash and a shelf grouped their files in the desktop client with path.Dir and a byte comparison. Core now owns the grouping: a file belongs to the folder before its last slash, the top being "", folders sort segment by segment and files by name in the project tree's natural order (lithe_core_rules::file_names), a folder right before its subfolders. The response carries indices into the request's paths so hosts keep their own file records. Shared fixture rust/fixtures/git/changed-file-groups-v1.json. Refs Lithe-IDEA/Lithe-IDEA#1814 * feat(git): worktree states, allowed writes and creation preview in Core git.worktrees now gives each worktree its state (missing, locked, modified, current, available) and the writes it allows with the reason a write is blocked; countChanges counts the local changes of every checkout in the same listing. git.worktreeCreationPreview derives the dialog's choices, held reference, cleaned branch name, suggested destination and readiness, so the desktop no longer keeps its own copy of these rules (Lithe-IDEA#1817). * feat(core): 新增 plugins.installed.lifecycle,插件启用与卸载规则由 Core 持有 新 crate lithe-plugin-lifecycle:输入已安装版本、用户的启用选择和动作(确认安装、启用、 禁用、卸载),返回每个已安装插件的启用状态和宿主按顺序执行的步骤(记录/清除选择、停止 程序、逐个删除版本并清除其批准记录、删除状态目录)。没有选择即禁用;确认安装只在没有 选择时启用;禁用先记录再停止;卸载先停止,再删除全部版本、清除选择和状态。对未安装插件 的动作返回 plugin.lifecycle.notInstalled。契约写入 rust-core-api.md,共享用例在 rust/fixtures/plugins/installed-lifecycle.json。 Refs 1lck/Lithe-IDEA#1842 * feat(editor-layout): 编辑分组与分栏树的状态转换下沉到 Core 新增纯规则 crate lithe-editor-layout,公开两条命令: - editor.groupLayout.reduce:在分组状态和分栏树上一起执行一次转换。 支持 editor.workbenchState.reduce 的全部动作,以及 openTab、dropTab、 removeEmptyGroups;分组离开状态时,叶子自动从树中移除。 拖放落点过期返回 stale,规则拒绝返回 refused,两种情况都按原样返回状态和树。 - editor.groupLayout.dropTargets:拖动开始时给出每个分组可接受的落点 (标签条、主体边缘分栏、主体中间追加),以及空编辑区是否可接受。 分栏比例、像素和拖动过程留在宿主;Core 只接收树的形状。新分栏使用宿主 提供的编号,新分组使用宿主提供的 ID。契约、fixture 和测试同步补齐。 Refs 1lck/Lithe-IDEA#1806 * feat(project-tree): 项目树可见行与多选规则下沉到 Core 新增两个纯规则 crate,公开两条命令: - workspace.rowSelection.reduce(lithe-row-selection):路径行的多选。 普通点击选中并清掉标记和锚点;Cmd/Ctrl 点击切换标记并设为锚点;Shift 点击从锚点(没有锚点时从选中行)标记到点击行,保留其他标记;clear 结束 批量操作。根节点永远不会被标记。点击已经消失的行返回 stale。targets 给出 批量操作的对象:去掉已标记文件夹里面的路径。项目树和变更列表共用。 - workspace.projectTree.rows(lithe-project-tree):宿主按先序发送已加载 节点(深度、是否展开)、选择和视口顶行路径;Core 返回可见行、修复后的选择 (节点消失或被折叠时移到最近的可见上级)、顶行的新行号和 targets。不读 磁盘,只在树形变化时调用,不在每帧调用。 契约、fixture 和测试同步补齐。 Refs 1lck/Lithe-IDEA#1800
xiaoyumuxi
marked this pull request as ready for review
November 14, 2026 03:07
This was referenced Nov 14, 2026
This was referenced Nov 14, 2026
Merged
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
Refs 1lck/Lithe-IDEA#1800、1lck/Lithe-IDEA#1806、1lck/Lithe-IDEA#1814、1lck/Lithe-IDEA#1817、1lck/Lithe-IDEA#1829、1lck/Lithe-IDEA#1830、1lck/Lithe-IDEA#1842、1lck/Lithe-IDEA#1847。这几张单在桌面端 1lck/Lithe-IDEA#1888 合入后关闭。
为什么要重新提交
#30 的 base 是 #28 的分支。#28 在 03:01:25 squash 合入
main,#30 在 03:01:40 才合入,而且合进的是 #28 原来的分支refactor/core-split-logging-workspace,没有进main。所以main上现在只有 46 个 crate,缺 #30 的 4 个新 crate 和八组规则。本 PR 从
main(7ae0c16)开分支,只摘取 #30 的 squash 提交 dfab9c5,没有其他改动。改动
与 #30 完全相同,逐条说明见 #30。概括:
lithe-editor-layout、lithe-plugin-lifecycle、lithe-project-tree、lithe-row-selection四个 crate,workspace 从 46 个变为 50 个。git.changedFileGroupsgit.worktreeCreationPreviewplugins.installed.lifecycleeditor.groupLayout.reduce、editor.groupLayout.dropTargetsworkspace.rowSelection.reduce、workspace.projectTree.rowsprocessLifecycle.resolve返回gracefulStopRule;network.proxyPolicy返回exclusionRules和invalidExclusions;git.worktrees返回每个工作树的状态、允许和被禁止的操作,并支持countChanges。验证
main(7ae0c16)的代码与 #28 的 head d235401 完全相同(git diff --quiet d235401 7ae0c16),本 PR 的代码与 #30 的 head 5efe90b 完全相同(git diff --quiet 5efe90b HEAD)。以下结果都在 5efe90b 上测得,见 #30:cargo fmt --all -- --check./scripts/rust-core/verify-rust-core-comments.shcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspacenode shared/plugins/scripts/verify-docs.mjs、sdk-e2e.mjsdesktop-go.sh vet/test,指向 5efe90b未能执行的检查:没有在 Windows 实机上运行
cargo test。