✨ feat(vscode): webview 移交/接管按钮、选人弹窗与待接管角标

Claude-Session: https://claude.ai/code/session_011cEyL6k351U2BzX1Qmygph
This commit is contained in:
cruldra committed 2026-08-26 16:41:35 +08:00
1 parent 6d3720d424
commit 6770570f09
6 files changed
+226 -3

No files matched your search

+25
View File
@@ -2,6 +2,7 @@ import type { PastedImage } from './components/NewIssueModal'
import type { Issue } from './types'
import { useEffect, useMemo, useRef, useState } from 'react'
import { BottomTabs } from './components/BottomTabs'
import { HandoffModal } from './components/HandoffModal'
import { KanbanBoard } from './components/KanbanBoard'
import { LogModal } from './components/LogModal'
import { NewIssueModal } from './components/NewIssueModal'
@@ -76,6 +77,12 @@ export function App() {
envLockRunning,
envLockTitle,
toggleEnvLock,
me,
handoffUsers,
requestHandoffUsers,
startHandoff,
acceptHandoff,
isHandoffRunning,
} = useIssues()
const { profiles: profileData, saveProfiles, openProfileValue } = useProfiles()
const {
@@ -92,6 +99,7 @@ export function App() {
} = useManagedSessions()
const [showNewIssueModal, setShowNewIssueModal] = useState(false)
const [showLogs, setShowLogs] = useState(false)
const [handoffIssue, setHandoffIssue] = useState<number | null>(null)
const [selectedId, setSelectedId] = useState<string | null>(null)
// 程序化设置的选中(反向选中 / pendingSelectId)记在这里,让下面的自动聚焦
// effect 跳过它——否则 选中→聚焦→终端激活→反向选中 会死循环、CPU 飙升。
@@ -374,6 +382,13 @@ export function App() {
onUpdateBrainstormProfilePath={updateIssueBrainstormProfilePath}
onUpdateTestProfilePath={updateIssueTestProfilePath}
onOpenLogs={() => setShowLogs(true)}
me={me}
onStartHandoff={(n) => {
setHandoffIssue(n)
requestHandoffUsers(n)
}}
onAcceptHandoff={acceptHandoff}
isHandoffRunning={isHandoffRunning}
profileData={profileData}
onProfileSave={saveProfiles}
onProfileOpen={openProfileValue}
@@ -448,6 +463,16 @@ export function App() {
onSubmit={handleSubmitNewIssue}
profiles={profiles}
/>
<HandoffModal
open={handoffIssue !== null}
issueNumber={handoffIssue}
users={handoffUsers && handoffUsers.issueNumber === handoffIssue ? handoffUsers.users : null}
onCancel={() => setHandoffIssue(null)}
onSubmit={(n, to) => {
startHandoff(n, to)
setHandoffIssue(null)
}}
/>
<LogModal
open={showLogs}
entries={logs}