tessl install tessl/npm-wrap-ansi@9.0.0Wordwrap a string with ANSI escape codes
Agent Success
Agent success rate when using this tile
100%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.04x
Baseline
Agent success rate without this tile
96%
{
"context": "This criteria evaluates how effectively the engineer uses the wrap-ansi package to handle text wrapping while correctly calculating visual width and ignoring ANSI escape codes. The focus is on using the appropriate package functions and options to achieve proper terminal text formatting.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses wrapAnsi function",
"description": "The solution imports and uses the wrapAnsi function (or default export) from the wrap-ansi package as the primary mechanism for text wrapping",
"max_score": 30
},
{
"name": "Passes column width",
"description": "The columnWidth parameter is correctly passed as the second argument to wrapAnsi to control the maximum line width",
"max_score": 15
},
{
"name": "Handles hard wrapping",
"description": "The solution uses the hard: true option to ensure long words that exceed the column width are broken across lines, preventing any line from exceeding the specified width",
"max_score": 25
},
{
"name": "Preserves ANSI codes",
"description": "The solution correctly relies on wrap-ansi's built-in ANSI code preservation without attempting to manually strip, parse, or re-insert ANSI escape sequences",
"max_score": 20
},
{
"name": "Returns wrapped string",
"description": "The solution returns the result from wrapAnsi directly (or with minimal processing) rather than implementing custom wrapping logic",
"max_score": 10
}
]
}