✨ feat(vscode): 设置和看板按仓库类型区分 GitHub 与 Gitea,GitHub 显示 gh 登录状态,文案去 Gitea 化
This commit is contained in:
1 parent
ac3c882672
commit
ae06c8e5d1
42 files changed
+443
-195
No files matched your search
@@ -8,6 +8,7 @@ import { isIssueLocked } from '../lib/dependencies'
|
||||
import { isIssueMine, issueOwnerLogin } from '../lib/issueOwnership'
|
||||
import { isSessionMissing } from '../lib/missingSession'
|
||||
import { toReadOnlySchema } from '../lib/readOnlySchema'
|
||||
import { trackerName } from '../lib/trackerName'
|
||||
import { COLUMN_LABELS, COLUMN_ORDER } from '../types'
|
||||
import { PropertyGrid } from './property-grid'
|
||||
|
||||
@@ -80,7 +81,7 @@ interface IssueDetailPanelProps {
|
||||
onOpenPrototypeInFigma: (issueNumber: number, path: string) => void
|
||||
/** Kick off the end-to-end implementation flow for the given plan file. */
|
||||
onImplement: (issueNumber: number, planFile: string, profilePath?: string, sessionId?: string) => void
|
||||
/** Open the gitea PR page in the browser. */
|
||||
/** Open the PR page in the browser. */
|
||||
onOpenPr: (pr: string) => void
|
||||
/** Start a background Claude run that writes the PR diff summary markdown. */
|
||||
onGeneratePrDiffSummary: (issueNumber: number) => void
|
||||
@@ -100,7 +101,7 @@ interface IssueDetailPanelProps {
|
||||
* 顶部垃圾桶按钮触发,扩展端做 modal confirm,可选。
|
||||
*/
|
||||
onDeleteIssue?: (issueNumber: number) => void
|
||||
/** 关闭 Gitea 工单,不清理本地会话、worktree、PR 或分支。 */
|
||||
/** 关闭代码托管仓库上的工单,不清理本地会话、worktree、PR 或分支。 */
|
||||
onCloseIssue: (issueNumber: number) => void
|
||||
/** 将实施中 / 审查中的工单重置回待办(清 worktree / 未合并 PR / feature 分支)。 */
|
||||
onResetToTodo: (issueNumber: number) => void
|
||||
@@ -133,7 +134,7 @@ interface IssueDetailPanelProps {
|
||||
onUpdatePrototypeProfilePath: (issueNumber: number, prototypeProfilePath: string) => void
|
||||
/** Open the in-webview log modal. */
|
||||
onOpenLogs: () => void
|
||||
/** 当前 Gitea login;undefined = 身份未知(接管按钮不显示)。 */
|
||||
/** 当前登录者的 login;undefined = 身份未知(接管按钮不显示)。 */
|
||||
me?: string
|
||||
onStartHandoff: (issueNumber: number) => void
|
||||
onAcceptHandoff: (issueNumber: number) => void
|
||||
@@ -142,14 +143,14 @@ interface IssueDetailPanelProps {
|
||||
onAcceptHandoffRequest: (issueNumber: number) => void
|
||||
onRejectHandoffRequest: (issueNumber: number) => void
|
||||
isHandoffRunning: (issueNumber: number) => boolean
|
||||
/** Gitea login → 头像 data URI;只读工单在标题旁贴归属人头像。 */
|
||||
/** login → 头像 data URI;只读工单在标题旁贴归属人头像。 */
|
||||
avatars?: Record<string, string>
|
||||
}
|
||||
|
||||
/**
|
||||
* 底部详情面板:以 PropertyGrid 形式展示当前选中 issue 的 state JSON。
|
||||
*
|
||||
* 顶部一行是 #编号/标题 + 「在 Gitea 打开」按钮;下面是 PropertyGrid
|
||||
* 顶部一行是 #编号/标题 + 「在 GitHub / Gitea / YouTrack 打开」按钮;下面是 PropertyGrid
|
||||
* 渲染的 state JSON 字段(当前为 column + sessionId)。sessionId 是
|
||||
* 一个 action 类型字段,双击或选中卡按 Enter 都会触发
|
||||
* `claude --resume <id>` 在新终端中恢复对话。
|
||||
@@ -860,8 +861,8 @@ export function IssueDetailPanel({
|
||||
: null}
|
||||
<button
|
||||
type="button"
|
||||
data-tooltip={issue.source === 'youtrack' ? '在 YouTrack 打开' : '在 Gitea 打开'}
|
||||
aria-label={issue.source === 'youtrack' ? '在 YouTrack 打开' : '在 Gitea 打开'}
|
||||
data-tooltip={`在 ${trackerName(issue)} 打开`}
|
||||
aria-label={`在 ${trackerName(issue)} 打开`}
|
||||
onClick={() => onOpenInBrowser(issue.htmlUrl)}
|
||||
className="inline-flex shrink-0 items-center justify-center rounded border border-[var(--vscode-panel-border)] p-1 text-xs hover:bg-black/10 dark:hover:bg-white/10"
|
||||
>
|
||||
@@ -914,8 +915,8 @@ export function IssueDetailPanel({
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
{/* Close/delete write to gitea by number — hide for youtrack cards to
|
||||
avoid acting on a gitea issue of the same number. */}
|
||||
{/* Close/delete write to the forge by number — hide for youtrack cards to
|
||||
avoid acting on a forge issue of the same number. */}
|
||||
{issue.source !== 'youtrack' && !readOnly && (
|
||||
<>
|
||||
{issue.handoffBundleKey && me !== undefined && (issue.assignees ?? []).includes(me) && (
|
||||
@@ -964,7 +965,7 @@ export function IssueDetailPanel({
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
data-tooltip="关闭工单(Gitea 里可重开)"
|
||||
data-tooltip={`关闭工单(可在 ${trackerName(issue)} 重开)`}
|
||||
onClick={() => onCloseIssue(issue.number)}
|
||||
aria-label="关闭工单"
|
||||
className="inline-flex shrink-0 items-center justify-center rounded border border-[var(--vscode-panel-border)] p-1 text-xs text-[var(--vscode-foreground)] hover:border-yellow-500/60 hover:bg-yellow-500/10 hover:text-yellow-500"
|
||||
|
||||
Reference in new issue
Block a user