✨ feat(vscode): 代码阅读预览按侧栏筛选算代码差异(未提交的更改对比上一次提交、审查对比 PR 目标分支;兄弟块按名字 / 相似度对齐,卡片内按行 / 值 / 词比对),算好后补发给预览

This commit is contained in:
cruldra committed 2026-09-30 08:35:17 +08:00
1 parent 3db44f84ae
commit 2a5806c6b5
23 files changed
+1527 -31

No files matched your search

+4 -1
View File
@@ -324,6 +324,8 @@ export interface GiteaPullRequest {
headRef: string
/** base 分支 sha:mergeBase 取不到时的左侧 ref 兜底。 */
baseSha: string
/** base 分支名(PR 要合进去的目标分支),如 `master`。 */
baseRef: string
/** base 与 head 的合并基:PR diff 的左侧 ref(三点 diff,与 Gitea 网页口径一致)。 */
mergeBase: string
}
@@ -353,7 +355,7 @@ export async function getPullRequest(opts: {
html_url?: unknown
body?: unknown
head?: { sha?: unknown, ref?: unknown }
base?: { sha?: unknown }
base?: { sha?: unknown, ref?: unknown }
merge_base?: unknown
}
return {
@@ -366,6 +368,7 @@ export async function getPullRequest(opts: {
headSha: typeof data.head?.sha === 'string' ? data.head.sha : '',
headRef: typeof data.head?.ref === 'string' ? data.head.ref : '',
baseSha: typeof data.base?.sha === 'string' ? data.base.sha : '',
baseRef: typeof data.base?.ref === 'string' ? data.base.ref : '',
mergeBase: typeof data.merge_base === 'string' ? data.merge_base : '',
}
}