Frontmatter
| id | 8307 |
| title | Neural Link: Support depth in getVdomTree and getVnodeTree |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Jan 4, 2026, 12:15 PM |
| updatedAt | Jan 4, 2026, 12:40 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8307 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8169 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 4, 2026, 12:40 PM |
Neural Link: Support depth in getVdomTree and getVnodeTree
tobiu assigned to @tobiu on Jan 4, 2026, 12:16 PM
tobiu added parent issue #8169 on Jan 4, 2026, 12:16 PM

tobiu
Jan 4, 2026, 12:39 PM
Input from Gemini 2.5 pro:
✦ I have verified the server-side implementation and the API definition:
ai/mcp/server/neural-link/openapi.yaml: Theget_vdom_treeandget_vnode_treeoperations useGetComponentTreeRequestschema, which correctly defines thedepthparameter (integer).ai/mcp/server/neural-link/services/ComponentService.mjs: ThegetVdomTreeandgetVnodeTreemethods correctly forward thedepthparameter to theConnectionService.ai/mcp/server/neural-link/services/toolService.mjs: Correctly binds the methods.The missing link was purely in the client-side
src/ai/client/ComponentService.mjs, which ignored the passeddepth. This has been rectified.The full stack now supports
depthfor VDOM/VNode inspection.
tobiu closed this issue on Jan 4, 2026, 12:40 PM
We need to update
getVdomTreeandgetVnodeTreeinsrc/ai/client/ComponentService.mjsto support a configureddepth.Currently, these methods return the raw
vdomorvnodeproperty of the component, which does not expand child component references or respect a depth limit.We will leverage
src/util/vdom/TreeBuilder.mjsto generate the trees with the specified depth.Requirements:
getVdomTreeto acceptdepthand useTreeBuilder.getVdomTree.getVnodeTreeto acceptdepthand useTreeBuilder.getVnodeTree.depthshould be -1 (infinite) if not specified, matchingTreeBuilderdefaults.Context: Real-world usage in
src/mixin/VdomLifecycle.mjsdemonstrates usingTreeBuilderfor scoped updates.