Expand description
Fuzzy matching and context-aware suggestions for template errors
This module provides intelligent suggestions when template errors occur, using Levenshtein distance for fuzzy matching and context extraction to help users fix common mistakes.
Structs§
- Suggestion
- Suggestion result with confidence scoring
Enums§
Constants§
- AVAILABLE_
FILTERS - All registered filters in the engine
- AVAILABLE_
FUNCTIONS - All registered functions in the engine
- CONTEXT_
VARIABLES - Top-level context variables always available in templates
Functions§
- extract_
available_ keys - Extract available keys from a JSON value at a given path
- extract_
filter_ name - Extract filter name from error message
- extract_
function_ name - Extract function name from error message
- extract_
variable_ name - Extract variable name from error message
- find_
closest_ matches - Find closest matches from a list of candidates
- levenshtein
- Calculate Levenshtein distance between two strings
- suggest_
available_ properties - Suggest available properties when accessing undefined key
- suggest_
iteration_ fix - Generate a type-specific hint for iteration errors
- suggest_
undefined_ variable - Suggest corrections for an undefined variable
- suggest_
unknown_ filter - Suggest corrections for an unknown filter
- suggest_
unknown_ function - Suggest corrections for an unknown function