TemplateEngine
Defined in: packages/core/src/template/engine.ts:7
Per-runtime Handlebars environment with a compile cache keyed by template source. Owned by RuntimeServices — one instance per createAdlRuntime call.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TemplateEngine():
TemplateEngine
Returns
Section titled “Returns”TemplateEngine
Methods
Section titled “Methods”compile()
Section titled “compile()”compile(
source):TemplateDelegate
Defined in: packages/core/src/template/engine.ts:12
Compile source once and reuse the compiled delegate on subsequent calls.
Parameters
Section titled “Parameters”source
Section titled “source”string
Returns
Section titled “Returns”TemplateDelegate
render()
Section titled “render()”render(
source,context):string
Defined in: packages/core/src/template/engine.ts:22
Render a template string with Handlebars (noEscape: true for plain-text prompts).
Parameters
Section titled “Parameters”source
Section titled “source”string
context
Section titled “context”object
Returns
Section titled “Returns”string