fix(ai-registry): correct search query for MCP "From registry" link#17740
fix(ai-registry): correct search query for MCP "From registry" link#17740safisa wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Thanks for the contribution. While this improves the topic a bit it does not work all the time, e.g. for this mcp server https://ai.open-vsx.org/?server=io.github.upstash%2Fcontext7. This together with the resulting strings not looking that nice i would be much more in favor of fixing the search to be much more stable in this regard. WDYT? Would you be interested in looking into that?
Edit: Also if the user copies the id from the website it should be findable.
|
Reworked to fix
Verified against the live registry: all 27 MCP servers and all 102 skills are found by their raw id, the exact entry is pinpointed, and |
sgraband
left a comment
There was a problem hiding this comment.
Thank you thats a nice change! Could you please squash your commits?
The MCP "From registry" link pre-filled the Extensions search with the raw registry serverId (e.g. io.github.ChromeDevTools/chrome-devtools-mcp), but RegistrySearchFilter strips the reverse-DNS domain labels (io, github) from entry ids while still requiring every query term to match. Those stripped labels could never match, so the linked server was filtered out and no results were shown. The same problem hit anyone copying a full id from the registry website. Fix it in the search filter itself rather than pre-transforming the query: - RegistrySearchFilter.matches reduces an id-shaped query (reverse-DNS domain with a / path) the same way it reduces entry ids, so the stripped boilerplate labels no longer disqualify the match. - meaningfulIdentifier keeps distinctive owner labels, dropping only the leading TLD and hosting namespaces (e.g. github in io.github.<owner>), so com.cloudflare.mcp/mcp reduces to 'cloudflare mcp mcp' and pinpoints it instead of 'mcp mcp' matching every server. - The MCP bridge now searches by the raw serverId - the clean string shown on the website. Verified against the live registry: all MCP servers and skills are found by their raw id, and 'git' still does not match every io.github.* entry. Fixes eclipse-theia#17739
3956507 to
0be5519
Compare
What it does
Fixes #17739.
The MCP "From registry" link pre-filled the Extensions search with the raw registry serverId (e.g.
io.github.ChromeDevTools/chrome-devtools-mcp).RegistrySearchFilterstrips the reverse-DNS domain labels (io,github) from entry ids while still requiring every query term to match, so those stripped labels could never match and the linked server was filtered out — the search showed no results.The bridge now sets the query via
RegistrySearchFilter.meaningfulIdentifier(serverId), the same reduction the filter matches against, so the linked server is reliably surfaced.How to test
Or run the added unit test:
Breaking changes
Review checklist
nlsservice (no user-facing text changed)