✨ feat(vscode): 支持讨论评论引用与 macOS 系统级新评论桌面提醒
This commit is contained in:
1 parent
540c212bad
commit
a2c3c1f919
13 files changed
+638
-302
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import type { TabKey } from './components/BottomTabs'
|
||||
import type { PastedImage } from './components/NewIssueModal'
|
||||
import type { Issue } from './types'
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
@@ -76,6 +77,8 @@ export function App() {
|
||||
clearLogs,
|
||||
pendingSelectId,
|
||||
clearPendingSelect,
|
||||
pendingSelectTab,
|
||||
clearPendingSelectTab,
|
||||
commitRunning,
|
||||
runCommit,
|
||||
hasChanges,
|
||||
@@ -123,6 +126,7 @@ export function App() {
|
||||
const [handoffIssue, setHandoffIssue] = useState<number | null>(null)
|
||||
const [handoffSession, setHandoffSession] = useState<{ id: string, name: string } | null>(null)
|
||||
const [selectedId, setSelectedId] = useState<string | null>(null)
|
||||
const [bottomTab, setBottomTab] = useState<TabKey>('issue')
|
||||
// 程序化设置的选中(反向选中 / pendingSelectId)记在这里,让下面的自动聚焦
|
||||
// effect 跳过它——否则 选中→聚焦→终端激活→反向选中 会死循环、CPU 飙升。
|
||||
const lastProgrammaticSelectRef = useRef<string | null>(null)
|
||||
@@ -157,8 +161,12 @@ export function App() {
|
||||
return
|
||||
lastProgrammaticSelectRef.current = pendingSelectId
|
||||
setSelectedId(pendingSelectId)
|
||||
if (pendingSelectTab) {
|
||||
setBottomTab(pendingSelectTab)
|
||||
clearPendingSelectTab()
|
||||
}
|
||||
clearPendingSelect()
|
||||
}, [pendingSelectId, readyIssues, clearPendingSelect])
|
||||
}, [pendingSelectId, pendingSelectTab, readyIssues, clearPendingSelect, clearPendingSelectTab])
|
||||
|
||||
// Issues partitioned by column, in COLUMN_ORDER. Used for arrow navigation.
|
||||
// 排序与看板视觉一致:完成列按 PR 合并时间降序,其余列按工单号降序。
|
||||
@@ -397,6 +405,8 @@ export function App() {
|
||||
</div>
|
||||
<div className="h-[40vh] shrink-0">
|
||||
<BottomTabs
|
||||
tab={bottomTab}
|
||||
onTabChange={setBottomTab}
|
||||
issue={selectedIssue}
|
||||
allIssues={state.issues}
|
||||
globalAutoReview={globalAutoReview}
|
||||
|
||||
Reference in new issue
Block a user