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

Function find

packages/tui/src/ui/dialog.tsx:89–95  ·  view source on GitHub ↗
(item: Renderable)

Source from the content-addressed store, hash-verified

87 if (!focus) return
88 if (focus.isDestroyed) return
89 function find(item: Renderable) {
90 for (const child of item.getChildren()) {
91 if (child === focus) return true
92 if (find(child)) return true
93 }
94 return false
95 }
96 const found = find(renderer.root)
97 if (!found) return
98 focus.focus()

Callers 4

refocusFunction · 0.70
input.tsFile · 0.50
context-epoch.tsFile · 0.50
instruction.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected