@@ -518,10 +518,6 @@ function resolveModelSupportMatchKind(
518518 return undefined ;
519519}
520520
521- function dedupeSortedPluginIds ( values : Iterable < string > ) : string [ ] {
522- return sortUniqueStrings ( values ) ;
523- }
524-
525521function classifyProviderRefOwnership ( pluginIds : string [ ] | undefined ) : ProviderRefOwnership {
526522 if ( ! pluginIds || pluginIds . length === 0 ) {
527523 return { status : "unowned" } ;
@@ -542,7 +538,7 @@ function listNormalizedOwnerMapPluginIds(
542538 matched . push ( ...pluginIds ) ;
543539 }
544540 }
545- return dedupeSortedPluginIds ( matched ) ;
541+ return sortUniqueStrings ( matched ) ;
546542}
547543
548544function resolveOwningPluginIdsForProviderFromSnapshot (
@@ -560,7 +556,7 @@ function resolveOwningPluginIdsForProviderFromSnapshot(
560556 const plugin = snapshot . byPluginId . get ( pluginId ) ;
561557 return plugin ? pluginOwnsProviderRef ( plugin , normalizedProvider ) : false ;
562558 } ) ;
563- const pluginIds = dedupeSortedPluginIds ( [ ...directOwners , ...aliasOwners ] ) ;
559+ const pluginIds = sortUniqueStrings ( [ ...directOwners , ...aliasOwners ] ) ;
564560 return pluginIds . length > 0 ? pluginIds : undefined ;
565561}
566562
@@ -571,7 +567,7 @@ function resolvePreferredManifestPluginIds(
571567 if ( matchedPluginIds . length === 0 ) {
572568 return undefined ;
573569 }
574- const uniquePluginIds = dedupeSortedPluginIds ( matchedPluginIds ) ;
570+ const uniquePluginIds = sortUniqueStrings ( matchedPluginIds ) ;
575571 if ( uniquePluginIds . length <= 1 ) {
576572 return uniquePluginIds ;
577573 }
@@ -691,7 +687,7 @@ function resolveOwningPluginIdsForCliBackend(params: {
691687 )
692688 . map ( ( plugin ) => plugin . id ) ;
693689
694- const deduped = dedupeSortedPluginIds ( pluginIds ) ;
690+ const deduped = sortUniqueStrings ( pluginIds ) ;
695691 return deduped . length > 0 ? deduped : undefined ;
696692}
697693
@@ -804,7 +800,7 @@ export function resolveOwningPluginIdsForModelRefs(params: {
804800} ) : string [ ] {
805801 const registry = params . manifestRegistry ? undefined : loadProviderRegistrySnapshot ( params ) ;
806802 const manifestRegistry = params . manifestRegistry ;
807- return dedupeSortedPluginIds (
803+ return sortUniqueStrings (
808804 params . models . flatMap (
809805 ( model ) =>
810806 resolveOwningPluginIdsForModelRef ( {
@@ -854,6 +850,6 @@ export function resolveCatalogHookProviderPluginIds(params: {
854850 ...params ,
855851 manifestRegistry,
856852 } ) . filter ( ( pluginId ) => runtimeAugmentPluginIds . has ( pluginId ) ) ;
857- return dedupeSortedPluginIds ( [ ...enabledProviderPluginIds , ...bundledCompatPluginIds ] ) ;
853+ return sortUniqueStrings ( [ ...enabledProviderPluginIds , ...bundledCompatPluginIds ] ) ;
858854}
859855export { testing as __testing } ;
0 commit comments