feat(git): inline file diffs in commit history rows (#1291)

* chore: add .worktrees/ to gitignore for worktree workflow

* feat(git): add getCommitFileDiff service function

* docs(git): document getCommitFileDiff in module docs

* feat(git): add GET /api/git/commit-file-diff route

* feat(git): add CommitFileDiffResponse type and GitAPI method signature

* feat(git): add getCommitFileDiff HTTP client function

* feat(git): add getCommitFileDiff API facade

* feat(git): add getCommitFileDiff stub to VS Code bridge

* feat(git): add getCommitFileDiff to VS Code gitService and bridge handler

* feat(git): add inline file diff to history commit rows

* fix(git): consolidate CommitFileDiffResponse import to gitApi facade

* fix(git): pass directory through history, validate hash, propagate git errors

* fix(git): use exit code check for VS Code getCommitFileDiff error detection

* fix(git): VS Code rename detection, hash validation parity, retry on error

* fix(git): register scroll container as virtualizer root to fix empty space in history diffs

* fix(git): address greptile review — rename key extraction, directory guard, language detection, isBinary cleanup

* fix(git): harden history inline diffs

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
Erman HAVUÇ
2026-05-17 20:08:17 +03:00
committed by GitHub
co-authored by Bohdan Triapitsyn
parent fa8fac2590
commit 631905764e
19 changed files with 488 additions and 44 deletions
@@ -484,14 +484,21 @@ export const dict: Record<I18nKey, string> = {
'gitView.header.removeRemoteAria': '移除远程 {name}',
'gitView.header.removeRemoteTitle': '移除 {name}',
'gitView.history.binary': '二进制',
'gitView.history.binaryNoDiff': '二进制文件 — 无可用 diff',
'gitView.history.commitsPlaceholder': '提交数',
'gitView.history.copySha': '复制 SHA',
'gitView.history.diffError': '加载 diff 失败,点击重试。',
'gitView.history.largeDiffDescription': '渲染可能较慢。你仍可点击下方查看 diff。',
'gitView.history.largeDiffTitle': '大型 diff({count} 行变更)',
'gitView.history.loadingDiff': '正在加载 diff...',
'gitView.history.loadingFiles': '正在加载文件...',
'gitView.history.logSize100': '100 个提交',
'gitView.history.logSize25': '25 个提交',
'gitView.history.logSize50': '50 个提交',
'gitView.history.noCommits': '未找到提交',
'gitView.history.noFiles': '没有文件',
'gitView.history.renamedNoDiff': '已重命名文件 — 不支持 diff',
'gitView.history.renderDiffAnyway': '仍然渲染',
'gitView.history.title': '历史',
'gitView.integrate.checking': '检查中…',
'gitView.integrate.cherryPickAbortedToast': '已中止 cherry-pick',