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

Function visibleKind

packages/app/src/components/file-tree.tsx:81–86  ·  view source on GitHub ↗
(node: FileNode, kinds?: ReadonlyMap<string, Kind>, marks?: Set<string>)

Source from the content-addressed store, hash-verified

79}
80
81const visibleKind = (node: FileNode, kinds?: ReadonlyMap<string, Kind>, marks?: Set<string>) => {
82 const kind = kinds?.get(node.path)
83 if (!kind) return
84 if (!marks?.has(node.path)) return
85 return kind
86}
87
88const buildDragImage = (target: HTMLElement) => {
89 const icon = target.querySelector('[data-component="file-icon"]') ?? target.querySelector("svg")

Callers 1

kindFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected