-
-
Notifications
You must be signed in to change notification settings - Fork 202
Refactor: Optimize Neural Link get_component_tree for token efficiency #8923
Copy link
Copy link
Closed
Labels
aienhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations
Description
The get_component_tree tool currently returns full component serialization (including VDOM, VNode, listeners) for every node in the hierarchy, resulting in massive payloads (1M+ tokens) for complex apps.
Goals:
- Introduce a
leanmode (default: true) toComponentService.getComponentTree. - Strict Whitelisting: In lean mode, return only the following properties:
id,className,ntype,parentId,items. - Ensure the recursion logic respects this whitelist, preventing any other configs (like
vdom,vnode,listeners,theme,style) from leaking into the output.
Impact:
Reduce payload size by ~95%, enabling agents to inspect large application trees without exhausting context windows.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
aienhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations