MCPcopy
hub / github.com/anomalyco/opencode / tabHref

Function tabHref

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

Source from the content-addressed store, hash-verified

34export const draftHref = (draftID: string) => `/new-session?draftId=${encodeURIComponent(draftID)}`
35
36export const tabHref = (tab: Tab) =>
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

Callers 5

SessionTabSlotFunction · 0.90
DraftTabSlotFunction · 0.90
tabKeyFunction · 0.85
navigateTabFunction · 0.85
tabs.tsxFile · 0.85

Calls 2

sessionHrefFunction · 0.90
draftHrefFunction · 0.85

Tested by

no test coverage detected