MCPcopy Create free account
hub / github.com/anomalyco/opencode / tabKey

Function tabKey

packages/app/src/context/tabs.tsx:39–39  ·  view source on GitHub ↗
(tab: Tab)

Source from the content-addressed store, hash-verified

37 tab.type === "draft" ? draftHref(tab.draftID) : sessionHref(tab.server, tab.sessionId)
38
39export const tabKey = (tab: Tab) => (tab.type === "draft" ? `draft:${tab.draftID}` : `${tab.server}\n${tabHref(tab)}`)
40
41export function sessionHasOpenTab(tabs: Tab[], server: ServerConnection.Key, session: Session) {
42 return tabs.some((tab) => tab.type === "session" && tab.server === server && tab.sessionId === session.id)

Callers 10

TitlebarFunction · 0.90
TitlebarTabStripFunction · 0.90
tabs.tsxFile · 0.85
navigateTabFunction · 0.85
removeTabFunction · 0.85
reorderFunction · 0.85
promoteDraftFunction · 0.85
rememberFunction · 0.85
toggleHomeFunction · 0.85
stateFunction · 0.85

Calls 1

tabHrefFunction · 0.85

Tested by

no test coverage detected