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

Function filterValidTabs

src/renderer/src/utils/tabRegistry.ts:52–60  ·  view source on GitHub ↗
(tabs: Tab[])

Source from the content-addressed store, hash-verified

50
51// 清理无效的 tabs(返回有效的 tabs)
52export function filterValidTabs(tabs: Tab[]): Tab[] {
53 return tabs.filter((tab) => {
54 const config = tabTypeRegistry.get(tab.type)
55 if (!config?.validateData || !tab.dataId) {
56 return true
57 }
58 return config.validateData(tab.dataId)
59 })
60}
61
62// 渲染 tab 编辑器内容
63export function renderTabEditor(tab: Tab): ReactNode {

Callers 1

tabsStore.tsFile · 0.90

Calls 1

getMethod · 0.65

Tested by

no test coverage detected