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

Function leaf

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

Source from the content-addressed store, hash-verified

336 }
337
338 const leaf = (path: string) => {
339 const idx = path.lastIndexOf("/")
340 return idx === -1 ? path : path.slice(idx + 1)
341 }
342
343 const out = nodes.filter((node) => {
344 if (node.type === "file") return current.files.has(node.path)

Callers 1

FileTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected