MCPcopy Create free account
hub / github.com/VPSDance/ai-proxy-rules / selectProviders

Function selectProviders

scripts/cli.ts:65–77  ·  view source on GitHub ↗
(inputDir: string, providerOption: string)

Source from the content-addressed store, hash-verified

63 }
64}
65
66async function selectProviders(inputDir: string, providerOption: string): Promise<ProviderSource[]> {
67 const providerNames = parseCsv(providerOption);
68
69 if (providerNames.includes("all")) {
70 return loadAllProviders(inputDir);
71 }
72
73 const providers = await Promise.all(
74 providerNames.map((providerName) => loadProvider(inputDir, providerName))
75 );
76
77 return providers.sort((a, b) => a.provider.localeCompare(b.provider));
78}
79
80function buildTargets(providers: ProviderSource[], providerOption: string): RenderTarget[] {

Callers 1

generateFunction · 0.85

Calls 3

loadAllProvidersFunction · 0.85
loadProviderFunction · 0.85
parseCsvFunction · 0.70

Tested by

no test coverage detected