MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / loadCatalogOrExit

Function loadCatalogOrExit

apps/kimi-code/src/cli/sub/provider.ts:399–407  ·  view source on GitHub ↗
(deps: ProviderDeps, url: string)

Source from the content-addressed store, hash-verified

397}
398
399async function loadCatalogOrExit(deps: ProviderDeps, url: string): Promise<Catalog> {
400 try {
401 return await fetchCatalog(url);
402 } catch (error) {
403 const suffix = error instanceof CatalogFetchError ? ` (HTTP ${String(error.status)})` : '';
404 deps.stderr.write(`Failed to fetch catalog from ${url}${suffix}: ${errorMessage(error)}\n`);
405 deps.exit(1);
406 }
407}
408
409export function registerProviderCommand(parent: Command, deps?: Partial<ProviderDeps>): void {
410 const provider = parent

Callers 2

handleCatalogListFunction · 0.85
handleCatalogAddFunction · 0.85

Calls 4

errorMessageFunction · 0.70
writeMethod · 0.65
exitMethod · 0.65
fetchCatalogFunction · 0.50

Tested by

no test coverage detected