Wordwrap a string with ANSI escape codes
Overall
score
100%
{
"context": "This criteria evaluates how well the engineer uses wrap-ansi to handle mixed content containing emoji, ANSI escape codes, and hyperlinks. The focus is on correct usage of wrap-ansi's core function to preserve all formatting elements during text wrapping.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import wrap-ansi",
"description": "Correctly imports the wrapAnsi function from the wrap-ansi package using require() or ES6 import syntax",
"max_score": 15
},
{
"name": "Use wrapAnsi function",
"description": "Calls the wrapAnsi() function with the message string and columns parameter to perform the wrapping operation",
"max_score": 25
},
{
"name": "Preserve ANSI codes",
"description": "The implementation correctly preserves ANSI escape codes (colors, styles) in the wrapped output by using wrap-ansi, which automatically maintains these codes across line breaks",
"max_score": 20
},
{
"name": "Preserve emoji",
"description": "The implementation correctly handles emoji characters by using wrap-ansi, which properly calculates visual width for Unicode characters including emoji and surrogate pairs",
"max_score": 20
},
{
"name": "Preserve hyperlinks",
"description": "The implementation correctly preserves ANSI hyperlinks (OSC 8 sequences) in the wrapped output by using wrap-ansi, which automatically reopens hyperlinks across line breaks",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-wrap-ansidocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10