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

Function parent

packages/app/src/components/file-tree.tsx:332–336  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

330 if (!current) return nodes
331
332 const parent = (path: string) => {
333 const idx = path.lastIndexOf("/")
334 if (idx === -1) return ""
335 return path.slice(0, idx)
336 }
337
338 const leaf = (path: string) => {
339 const idx = path.lastIndexOf("/")

Callers 2

FileTreeFunction · 0.85
MessageTimelineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected