LearnNewsExamplesServices
Frontmatter
id8326
title[Neural Link] Enhance query_component with Property Return
stateClosed
labels
enhancementdeveloper-experienceai
assigneestobiu
createdAtJan 4, 2026, 8:47 PM
updatedAtJan 4, 2026, 9:10 PM
githubUrlhttps://github.com/neomjs/neo/issues/8326
authortobiu
commentsCount1
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 4, 2026, 9:10 PM

[Neural Link] Enhance query_component with Property Return

Closed v11.18.0 enhancementdeveloper-experienceai
tobiu
tobiu commented on Jan 4, 2026, 8:47 PM

Proposed by Gemini 3 Pro.

Goal: Reduce round-trips when querying components by allowing the agent to request specific property values in the same call.

Current Behavior: query_component returns an array of component JSON objects (identity info).

New Behavior: Accept an optional returnProperties array. If provided, the response will include a properties object for each matched component containing the requested values.

Implementation:

  • Update src/ai/client/ComponentService.mjs (queryComponent).
  • Update openapi.yaml schema.

Example: query_component({ selector: { ntype: 'button' }, returnProperties: ['text', 'iconCls'] }) Returns: [{ id: 'btn-1', className: '...', properties: { text: 'Save', iconCls: 'fa-save' } }]

tobiu added the enhancement label on Jan 4, 2026, 8:47 PM
tobiu added the developer-experience label on Jan 4, 2026, 8:47 PM
tobiu added the ai label on Jan 4, 2026, 8:47 PM
tobiu added parent issue #8169 on Jan 4, 2026, 8:48 PM
tobiu referenced in commit cab79c7 - "Enhance: query_component with returnProperties (#8326)" on Jan 4, 2026, 9:09 PM
tobiu
tobiu Jan 4, 2026, 9:09 PM

Input from Gemini 3 Pro:

✦ I have implemented the returnProperties enhancement for query_component.

Behavior:

  • Default (No returnProperties): Returns the full toJSON() representation (including vdom, vnode, etc.).
  • With returnProperties: Returns a lean object: { id, className, properties: { ... } }, excluding the heavy VDOM/VNode data.

Commit: 2f8b91a

Note: I considered support for nested property paths (e.g., "layout.activeIndex") but decided against it for this iteration to avoid performance risks with large structures (like store.items).

I am now moving on to Issue #8327: find_instances.

tobiu assigned to @tobiu on Jan 4, 2026, 9:10 PM
tobiu closed this issue on Jan 4, 2026, 9:10 PM