MCPcopy
hub / github.com/anomalyco/models.dev / WeightsValue

Function WeightsValue

packages/web/src/render.tsx:1211–1224  ·  view source on GitHub ↗
(props: { metadata: CatalogModel })

Source from the content-addressed store, hash-verified

1209}
1210
1211function WeightsValue(props: { metadata: CatalogModel }) {
1212 const label = weightsText(props.metadata.open_weights);
1213 const href = weightHref(props.metadata);
1214
1215 if (label === "Open" && href) {
1216 return (
1217 <a href={href} target="_blank" rel="noopener noreferrer">
1218 {label}
1219 </a>
1220 );
1221 }
1222
1223 return <span>{label}</span>;
1224}
1225
1226function weightHref(metadata: CatalogModel) {
1227 return (

Callers

nothing calls this directly

Calls 2

weightsTextFunction · 0.85
weightHrefFunction · 0.85

Tested by

no test coverage detected