Lee-W commented on code in PR #71478:
URL: https://github.com/apache/airflow/pull/71478#discussion_r3988257428


##########
registry/src/js/search.js:
##########
@@ -110,13 +111,25 @@
       const icon = type === 'provider' ? 'P' : (moduleType ? 
(typeIcons[moduleType] || moduleType[0].toUpperCase()) : 'M');
       const resultType = type === 'provider' ? 'provider' : moduleType;
 
+      // A provider often matches because of an external service its 
connections
+      // reach (e.g. "anthropic" -> Common AI), not the provider's own name --
+      // badge the specific service so that's visible instead of just the
+      // provider it lives under.
+      let matchedService = '';
+      if (type === 'provider' && currentQuery) {
+        const services = (result.meta.externalServices || 
'').split(',').filter(Boolean);
+        const normalizedQuery = currentQuery.toLowerCase();
+        matchedService = services.find((service) => 
service.toLowerCase().includes(normalizedQuery)) || '';

Review Comment:
   The badge now runs the query through the same `normalize()` collapse, then 
matches a word start instead of a substring — `ai` no longer credits OpenAI, 
`llm` credits nothing, and `mistral-ai` resolves to Mistral AI.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to