(providers: ProviderSource[], providerOption: string)
| 77 | return providers.sort((a, b) => a.provider.localeCompare(b.provider)); |
| 78 | } |
| 79 | |
| 80 | function buildTargets(providers: ProviderSource[], providerOption: string): RenderTarget[] { |
| 81 | const providerTargets = providers.map(providerToTarget); |
| 82 | const providerNames = parseCsv(providerOption); |
| 83 | |
| 84 | if (providerNames.includes("all") || providers.length > 1) { |
| 85 | return [ |
| 86 | ...providerTargets, |
| 87 | ...aggregateProvidersByCategory(providers), |
| 88 | aggregateProvidersByScope(providers, "cn", "cn", "China AI Providers", "Aggregated China AI provider rules."), |
| 89 | aggregateProvidersByScope(providers, "global", "global", "Global AI Providers", "Aggregated global AI provider rules."), |
| 90 | aggregateProviders(providers) |
| 91 | ]; |
no test coverage detected