Protected StaticplaceholdersArray of system placeholders. Protected to allow extension by subclasses.
StaticaddStaticAddAdds a new system placeholder.
The placeholder to add
StaticgetStaticGetGets a specific placeholder by name.
The placeholder name
The placeholder if found
StaticgetUse GetPlaceholders.
StaticGetGets the current array of system placeholders. Returns a reference to the array, allowing direct manipulation.
The array of system placeholders
StaticremoveStaticRemoveRemoves a system placeholder by name.
The name of the placeholder to remove
True if removed, false if not found
StaticReplaceReplaces bare {{ _NAME }} tokens in messages that never pass through the template engine, such as
scoped prompt parts. This is substitution, not rendering: filters, tags, {{{ }}} and every other
character stay as written. A token also stays as written when its placeholder declares no requires,
needs something params does not carry, needs execution, fails, or returns no value, so the model
sees the token rather than an empty value. Only string content is read. Each placeholder resolves
once per call, so every message sees the same clock.
The messages to resolve. Not modified.
What is known before the prompt runs, typically contextUser
The messages with resolved tokens replaced, in the same order
StaticresetUse ResetToDefaults.
StaticResetClears all custom placeholders and resets to defaults. Useful for testing or resetting state.
StaticresolveStaticResolveInternalResolves all system placeholders for the given prompt parameters. Returns a map of placeholder names to their resolved values.
The prompt parameters
Map of placeholder names to values
Manager class for system placeholders. Provides methods to get, add, remove, and resolve placeholders.
SystemPlaceholderManager