MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getDimensions

Function getDimensions

server/src/training-agent/task-handlers.ts:3106–3109  ·  view source on GitHub ↗
(format: { renders: Array<Record<string, unknown>> } | undefined)

Source from the content-addressed store, hash-verified

3104}
3105
3106function getDimensions(format: { renders: Array<Record<string, unknown>> } | undefined): { w: number; h: number } {
3107 const dims = format?.renders?.[0]?.dimensions as { width?: number; height?: number } | undefined;
3108 return { w: dims?.width || 300, h: dims?.height || 250 };
3109}
3110
3111function buildHtmlAssets(html: string): AdcpCreativeManifest['assets'] {
3112 // HTMLAsset in @adcp/client ≥5.10 has `asset_type: 'html'` as a required

Callers 2

handleBuildCreativeFunction · 0.85
buildPreviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected