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

Function dirsToExpand

packages/app/src/components/file-tree.tsx:53–61  ·  view source on GitHub ↗
(input: {
  level: number
  filter?: { dirs: Set<string> }
  expanded: (dir: string) => boolean
})

Source from the content-addressed store, hash-verified

51}
52
53export function dirsToExpand(input: {
54 level: number
55 filter?: { dirs: Set<string> }
56 expanded: (dir: string) => boolean
57}) {
58 if (input.level !== 0) return []
59 if (!input.filter) return []
60 return [...input.filter.dirs].filter((dir) => !input.expanded(dir))
61}
62
63const kindLabel = (kind: Kind) => {
64 if (kind === "add") return "A"

Callers 2

file-tree.test.tsFile · 0.85
FileTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected