MCPcopy Create free account
hub / github.com/experdot/pointer / tryRestoreTab

Function tryRestoreTab

src/renderer/src/utils/tabRegistry.ts:43–49  ·  view source on GitHub ↗
(type: string, dataId?: string)

Source from the content-addressed store, hash-verified

41
42// 尝试恢复已关闭的 tab
43export function tryRestoreTab(type: string, dataId?: string): Tab | null {
44 const config = tabTypeRegistry.get(type)
45 if (!config?.restoreTab || !dataId) {
46 return null
47 }
48 return config.restoreTab(dataId)
49}
50
51// 清理无效的 tabs(返回有效的 tabs)
52export function filterValidTabs(tabs: Tab[]): Tab[] {

Callers 1

tryNavigateToHistoryFunction · 0.90

Calls 1

getMethod · 0.65

Tested by

no test coverage detected