MCPcopy
hub / github.com/github/awesome-copilot / getTemplatePackOrThrow

Function getTemplatePackOrThrow

extensions/site-studio/extension.mjs:432–439  ·  view source on GitHub ↗
(packId)

Source from the content-addressed store, hash-verified

430}
431
432function getTemplatePackOrThrow(packId) {
433 const id = safeString(packId, DEFAULT_TEMPLATE_PACK);
434 const pack = TEMPLATE_PACKS[id];
435 if (!pack) {
436 throw new CanvasError("unknown_template_pack", `Unknown template pack: ${id}`);
437 }
438 return { id, pack };
439}
440
441function getFieldSuggestionsForSection(sectionId) {
442 if (!stateCache?.fieldSuggestions || typeof stateCache.fieldSuggestions !== "object") {

Callers 2

applyTemplatePackFunction · 0.85
createInitialStateFunction · 0.85

Calls 1

safeStringFunction · 0.85

Tested by

no test coverage detected