✨ feat(vscode): 「改动」tab 重做为整 PR 聚合的主从式内联 diff(git-diff-view)

- 左树右 diff:左栏全 PR 文件树 + 统计条(共改 N · +X−Y · 已查看 M/N),右栏选中单文件内联 diff
- 用 @git-diff-view/react 只渲染当前选中文件,绕开上万行全量渲染的性能坑
- gitea 新增 listPullRequestFiles、getPullRequest 取 merge_base/head,按需回两版原文
- diff 走 merge_base→head 三点口径(与 Gitea 网页一致),getRawFile 404 兜底成全增/全删/改名
- 已查看态按 head sha 落盘、新 push 自然重置;去掉提交列表、原生 diff 与 spx-gitea 虚拟文档 provider
This commit is contained in:
cruldra committed 2026-06-29 10:52:36 +08:00
1 parent ceea62ed16
commit fb505d59c5
18 files changed
+1149 -1127

No files matched your search

@@ -10,14 +10,14 @@
import type { ClaudeProfile } from '../hooks/useIssues'
import type { ProfilesData } from '../lib/messages'
import type { Issue, ManagedSessionsData } from '../types'
import { ClipboardList, GitCommitHorizontal, Layers, MessagesSquare } from 'lucide-react'
import { ClipboardList, FileDiff, Layers, MessagesSquare } from 'lucide-react'
import { useState } from 'react'
import { IssueDetailPanel } from './IssueDetailPanel'
import { ManagedSessionsPanel } from './ManagedSessionsPanel'
import { PrCommitsPanel } from './PrCommitsPanel'
import { PrFilesPanel } from './PrFilesPanel'
import { ProfileGrid } from './ProfileGrid'
type TabKey = 'issue' | 'profile' | 'sessions' | 'commits'
type TabKey = 'issue' | 'profile' | 'sessions' | 'changes'
interface BottomTabsProps {
// Issue tab props (pass-through to IssueDetailPanel)
@@ -87,10 +87,10 @@ export function BottomTabs(props: BottomTabsProps) {
title="会话"
/>
<TabButton
active={tab === 'commits'}
onClick={() => setTab('commits')}
icon={<GitCommitHorizontal className="size-4" />}
title="提交"
active={tab === 'changes'}
onClick={() => setTab('changes')}
icon={<FileDiff className="size-4" />}
title="改动"
/>
</div>
@@ -143,8 +143,8 @@ export function BottomTabs(props: BottomTabsProps) {
onCloseTab={props.onManagedSessionCloseTab}
/>
)}
{tab === 'commits' && (
<PrCommitsPanel issue={props.issue} />
{tab === 'changes' && (
<PrFilesPanel issue={props.issue} />
)}
</div>
</div>