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

Function sessionPath

packages/app/src/context/layout.tsx:97–103  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

95}
96
97const sessionPath = (key: string) => {
98 const dir = SessionStateKey.route(key).split("/")[0]
99 if (!dir) return
100 const root = decode64(dir)
101 if (!root) return
102 return createPathHelpers(() => root)
103}
104
105const normalizeSessionTab = (path: ReturnType<typeof createPathHelpers> | undefined, tab: string) => {
106 if (!tab.startsWith("file://")) return tab

Callers 2

tabsFunction · 0.70

Calls 2

decode64Function · 0.90
createPathHelpersFunction · 0.90

Tested by

no test coverage detected