♻️ fix(vscode): 「已查看」改为按文件变更指纹失效,PR 新 push 只摘变动文件的勾
原先按 head sha 存已查看,作者一推新提交 head sha 变了,全部勾一起清空——
哪怕只改了一个文件也把没动的勾全冲掉。改成 GitHub「Viewed」式的内容感知:
按每个文件的变更指纹 (status|additions|deletions) 存,拉文件时与当前指纹比对,
只有真改动过的文件掉勾,没动的保留;比对后顺手剪掉盘上失配/消失的条目。
Gitea 的 ChangedFile 不返回 blob sha、compare 端点也不支持任意 commit sha,
故用上述三元组作指纹(文件一改几乎必变其一),零额外请求。
- prReviewStore: 形状改为 issueNumber → {path: sig},导出 read/writeConfirmedSigs
- prFiles: handleGetPrFiles 按指纹过滤+剪枝,顺带去掉不再需要的 getPullRequest 调用
- 消息 pr-files/show 去掉无人消费的 headSha/mergeBase;pr-review/set 改发 {path: sig}
- usePrFiles: 删 headSha,setConfirmed 把路径映射成指纹再发
This commit is contained in:
1 parent
bd8ba714b3
commit
35085f72f7
6 files changed
+96
-75
No files matched your search
@@ -6,7 +6,7 @@
|
||||
* - 右栏:选中文件的内联 diff(git-diff-view,只渲染当前一个文件)。
|
||||
*
|
||||
* 自带 usePrFiles hook,直接经 lib/vscode 收发消息,不依赖上层回调。diff 左右两侧用
|
||||
* merge_base → head 的原文(与 Gitea 网页 diff 口径一致),已查看态按 head sha 落盘。
|
||||
* merge_base → head 的原文(与 Gitea 网页 diff 口径一致),已查看态按文件变更指纹落盘。
|
||||
*/
|
||||
|
||||
import type { Issue } from '../types'
|
||||
|
||||
Reference in new issue
Block a user