Repository navigation
feat(core): #1662 第二轮 工作区文件(WS-06/07/11) - #1769
Merged
Merged
Conversation
This was referenced Nov 5, 2026
新增 history.planEvent,两端按 Core 规划的快照记录;Windows 保存后立即记快照,重命名/移动后接上 history.relocate。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
新增 workspace.reduceDirectoryAction 与 workspace.relocateDirectoryRules,删除两端各自的实现。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
新增 workspace.planDuplicate 与 workspace.planPaste,统一为 ` copy` / ` copy N`;平台只提供已存在名称并以不覆盖方式创建,冲突时重新规划。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
复制前用 ssh_read_directory/wsl_read_directory 读出目标目录的真实名字,后端返回 destination_exists 时重新规划;补充测试和功能矩阵说明。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
force-pushed
the
feat/issue-1662-r2-workspace-files
branch
from
November 5, 2026 14:44
e23be40 to
2013e2e
Compare
Owner
Author
本地验证Mac:本 PR 在第二轮集成分支上和 #1765、#1766、#1767、#1768 一起验证过,rebase 后的代码树与验证时的集成提交完全一致。
Windows 真机(lithe-dev,2013e2e7)
验证通过后,用 |
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.
引用 #1662 第二轮「工作区文件」车道。三个条目均两端接入、旧实现已删除。
WS-06 Local History 记录时机与重命名迁移
history.planEvent:按事件(save/autoSave/restore/manual/unsavedDiscard/externalChange/beforeRename/beforeBatchReplace)返回要记录的快照(来源 + 原因)。ProjectHistoryFeatureModel的保存、丢弃、恢复、外部变更、重命名前记录都改按 Core 的计划执行。history.relocate迁移历史。beforeDelete原因目前两端都没有调用方,故未放入计划表。WS-07 复制与粘贴重名命名
workspace.planDuplicate/workspace.planPaste。统一规则:foo.txt→foo copy.txt→foo copy 2.txt,目录和.gitignore不拆扩展名。理由:macOS(Finder/IDEA 风格)与 Windows host 已是copy,Windows TS 的_copy还会产出foo._copy.txt,故以多数且正确的一种为准。create_new/不替换的MoveFileEx,SSH/WSL 查当前树);名字被并发占用时加入已知事实后重新规划,用尽 512 轮报稳定错误destination_exists。duplicate_path;删除unique_destination、macOSavailableDuplicateURL与 TS 命名循环。WS-11 目录角色、取消排除与规则迁移
workspace.reduceDirectoryAction/workspace.relocateDirectoryRules(含跨工作区根迁移)。排除时记住原角色,取消时恢复,被手动排除的祖先不可覆盖,移动或删除后迁移子树里的键。验证
bun run typecheck通过;file-explorer / file-system / local-history / editor stores 下测试逐文件通过;cargo check --bin lithe-windows仅既有 2 个std::os::windows错误。swift build --build-tests通过;LitheCoreLogic、LocalHistory、LazyProjectTree、ProjectTreeBatch、新增 WorkspaceRulesCoreContract 通过,唯一失败为cancellingSaveAllDuringRemoteDrainDoesNotWrite(Save All 路径,未触及本 PR 代码,未在 preview 上对照,待确认是否既有)。verify-runtime-bundle-immutability之外的 CI。重叠
#1658 同时改动
project/indexing.rs、directory-marks.ts、WorkspaceFeatureModel.swift、WorkspaceIndexingPolicy.swift、workspace-indexing-exclusions.json、rust-core-api.md、command.rs、dispatcher.rs,WS-11 部分可能冲突。补充:SSH/WSL 复制的后端现状(主会话核对)
ssh_copy_path、wsl_copy_path、ssh_read_directory、wsl_read_directory目前在src-tauri里没有注册。platform/tauri-core.ts把ssh_*和wsl_*归入remote、wsl后端能力,能力不可用时在 IPC 之前就会拒绝调用,所以 Windows 上这两类根的文件操作原本就不可用。destination_exists就重新规划”的方式接好。后端实现落地时,需要保证复制不会覆盖已有文件,并返回destination_exists。🤖 Generated with Claude Code