feat(diff): compare directories and synchronize entries (#661)

Two folders can now be compared from the project view (Compare Directories with two folders selected, or Compare With… on one folder, also in Find Action). The result tree marks entries as only on left, only on right, contents differ or identical, with a name filter and a show-identical toggle; double-click opens the existing diff editor, and files or whole subdirectories can be copied to either side (overwrite and delete ask first, extra files in the target are kept). Comparison runs in the background with progress and cancel, honours the project's exclusions, and works for remote projects through the same file commands.

The comparison tree and diff preview are shared with the Git folder/revision comparison.

Verified on macOS (subdirectories, Chinese names, binary files, copy both ways, delete, cancel on large files); Windows and Linux not run.

Fixes #520
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-01 15:14:13 +08:00
1 джерело 482241ebb9
коміт 1716f3e062
23 files changed
+1552 -87

No files matched your search

+32 -1
Переглянути файл
@@ -5382,5 +5382,36 @@
"in {length} repositories": "在 {length} 个仓库中",
"No repository in the selection has revision {label}": "所选内容中的仓库均无版本 {label}",
"{repoName} has no revision {label}": "{repoName} 没有版本 {label}",
"Waiting for language server…": "正在等待语言服务器…"
"Waiting for language server…": "正在等待语言服务器…",
"Compare Directories": "比较目录",
"Select two directories to compare": "选择两个要比较的目录",
"Select a directory to compare": "选择要比较的目录",
"Directory path": "目录路径",
"Only on left": "仅左侧",
"Only on right": "仅右侧",
"Contents differ": "内容不同",
"Comparing directories": "正在比较目录",
"Filter by name": "按名称过滤",
"Show identical files": "显示相同文件",
"Copy to Left": "复制到左侧",
"Copy to Right": "复制到右侧",
"Compared files": "比较的文件",
"Comparison cancelled": "已取消比较",
"No matching differences": "没有匹配的差异",
"Overwrite files?": "覆盖文件?",
"Copy to {to} and overwrite existing files?": "复制到 {to} 并覆盖已有文件?",
"Left: {left}": "左侧:{left}",
"Right: {right}": "右侧:{right}",
"Compared {compared} of {total} entries": "已比较 {compared} / {total} 个条目",
"Scanned {scanned} entries": "已扫描 {scanned} 个条目",
"Binary content": "二进制内容",
"Binary files cannot be shown as text": "二进制文件无法以文本形式显示",
"Delete {path}?": "删除 {path}?",
"copy requires an absolute path": "复制需要绝对路径",
"missing file name": "缺少文件名",
"copy requires absolute paths": "复制需要绝对路径",
"copy paths must belong to the comparison roots": "复制路径必须位于比较的根目录内",
"cannot copy overlapping paths": "无法在相互包含的路径之间复制",
"cannot copy through a destination symlink": "无法通过目标目录内的符号链接复制",
"expected a relative comparison entry path": "需要比较条目的相对路径"
}