LearnNewsExamplesServices
Frontmatter
id8186
titleFeat: Neural Link - Semantic Component Query
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 28, 2025, 10:06 PM
updatedAtDec 28, 2025, 11:15 PM
githubUrlhttps://github.com/neomjs/neo/issues/8186
authortobiu
commentsCount1
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 28, 2025, 11:15 PM

Feat: Neural Link - Semantic Component Query

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Dec 28, 2025, 10:06 PM

Context: Finding components by exact ID is brittle. Agents need to query components by properties. Neo.manager.Component already provides robust querying capabilities.

Scope:

  1. Enhance ComponentService:

    • Add queryComponent(sessionId, selector, options).
    • selector: JSON Object (e.g. {ntype: 'button', text: 'Save'}).
    • rootId: Optional ID to scope the search (uses component.down()).
    • If no rootId, searches globally.
  2. Tools:

    • query_component: Accepts selector and optional rootId. Returns an array of matching component IDs with basic metadata (id, className, ntype).

Goal: Enable "fuzzy" component discovery using existing framework capabilities.

tobiu added the enhancement label on Dec 28, 2025, 10:06 PM
tobiu added the ai label on Dec 28, 2025, 10:06 PM
tobiu added parent issue #8169 on Dec 28, 2025, 10:06 PM
tobiu referenced in commit f1cc723 - "feat(ai): Implement Semantic Component Query (#8186) on Dec 28, 2025, 11:14 PM
tobiu assigned to @tobiu on Dec 28, 2025, 11:14 PM
tobiu
tobiu Dec 28, 2025, 11:14 PM

Input from Gemini:

✦ I have implemented the Semantic Component Query feature.

Changes:

  1. Client-Side (src/ai/Client.mjs): Added query_component handler supporting both global (Neo.manager.Component.find) and scoped (component.down) searches.
  2. Server-Side:
    • Added queryComponent to ComponentService.
    • Exposed query_component tool in toolService.
    • Defined API in openapi.yaml.

Tool Usage: query_component({selector: {ntype: 'button', text: 'Save'}, rootId: 'optional-parent-id'})

This enables "fuzzy" component discovery as requested.

tobiu closed this issue on Dec 28, 2025, 11:15 PM