openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 631 B
JavaScript
//!src/templates/labs-gate.ts
const TEMPLATES_LABS_DISABLED_MESSAGE=`Templates is off in Settings > Labs. Turn it on to discover or add Templates.`;var TemplatesLabsDisabledError=class extends Error{constructor(){super(TEMPLATES_LABS_DISABLED_MESSAGE);this.name=`TemplatesLabsDisabledError`}};function isTemplatesLabsEnabled(e){return e.gateway?.controlUi?.experimental?.templates===true}function assertTemplatesLabsEnabled(e){if(!isTemplatesLabsEnabled(e))throw new TemplatesLabsDisabledError}export{isTemplatesLabsEnabled as i,TemplatesLabsDisabledError as n,assertTemplatesLabsEnabled as r,TEMPLATES_LABS_DISABLED_MESSAGE as t};