UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.28 kB
import{r as normalizeProviderId}from"./provider-id-A-8WTtLA.mjs";import{i as isInstalledPluginEnabled}from"./installed-plugin-index-B04a42mO.mjs";import{o as resolvePluginContributionOwners}from"./plugin-registry-contributions-C4xBwxaW.mjs";import{t as planEffectiveModelCatalogRows}from"./model-catalog-BG6rYCD1.mjs";import{s as loadManifestMetadataSnapshot}from"./manifest-contract-eligibility-BFn2JM5T.mjs"; //!src/commands/models/list.manifest-catalog.ts function loadStaticManifestCatalogRowsForList(e){const t=e.providerFilter?normalizeProviderId(e.providerFilter):void 0;const n=e.metadataSnapshot??loadManifestMetadataSnapshot({config:e.cfg,env:e.env??process.env});const rowsForPluginIds=r=>{if(r?.length===0)return[];const i=r?new Set(r):void 0;const a=n.manifestRegistry;return planEffectiveModelCatalogRows({registry:i?{...a,plugins:a.plugins.filter(e=>i.has(e.id))}:a,config:e.cfg,...t?{providerFilter:t}:{},selection:`static`}).rows};if(!t)return rowsForPluginIds();const r=rowsForPluginIds(isInstalledPluginEnabled(n.index,t,e.cfg,e.env)?[t]:[]);if(r.length>0)return r;return rowsForPluginIds(resolvePluginContributionOwners({lookUpTable:n,config:e.cfg,env:e.env,contribution:`modelCatalogProviders`,matches:t}))}export{loadStaticManifestCatalogRowsForList as t};