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

Function boxPath

packages/opencode/test/cli/run/footer.view.test.tsx:255–262  ·  view source on GitHub ↗
(root: BoxRenderable | RootRenderable, name: string)

Source from the content-addressed store, hash-verified

253}
254
255function boxPath(root: BoxRenderable | RootRenderable, name: string): BoxRenderable[] | undefined {
256 for (const item of root.getChildren()) {
257 if (item.constructor.name === name) return root instanceof BoxRenderable ? [root] : []
258 if (!(item instanceof BoxRenderable)) continue
259 const path = boxPath(item, name)
260 if (path) return root instanceof BoxRenderable ? [root, ...path] : path
261 }
262}
263
264function footerComposerFrame(root: BoxRenderable | RootRenderable) {
265 return boxPath(root, "TextareaRenderable")!.at(-5)!

Callers 1

footerComposerFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected