CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-wrap-ansi

tessl install tessl/npm-wrap-ansi@9.0.0

Wordwrap 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%

rubric.jsonevals/scenario-1/

{
  "context": "This evaluation assesses how well the engineer uses the wrap-ansi package to handle multiple types of ANSI escape sequences (SGR codes and OSC 8 hyperlinks) during text wrapping. The focus is on correct usage of wrap-ansi's core functionality to preserve different escape sequence types.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses wrap-ansi",
      "description": "The solution imports and uses the wrapAnsi function from the wrap-ansi package (default export or named import)",
      "max_score": 20
    },
    {
      "name": "Correct function signature",
      "description": "Calls wrapAnsi with the correct parameters: wrapAnsi(string, columns, options?) where string is the text to wrap and columns is the width",
      "max_score": 15
    },
    {
      "name": "Plain text wrapping",
      "description": "Successfully wraps plain text without escape sequences by passing text and column width to wrapAnsi",
      "max_score": 15
    },
    {
      "name": "SGR code preservation",
      "description": "Correctly handles text with SGR (Select Graphic Rendition) codes by using wrapAnsi, which automatically preserves color and style codes during wrapping",
      "max_score": 20
    },
    {
      "name": "OSC 8 hyperlink preservation",
      "description": "Correctly handles text with OSC 8 hyperlink sequences by using wrapAnsi, which automatically maintains clickable links across wrapped lines",
      "max_score": 20
    },
    {
      "name": "Mixed escape sequences",
      "description": "Successfully handles text containing both SGR codes and OSC 8 hyperlinks simultaneously by relying on wrapAnsi's built-in support for multiple escape sequence types",
      "max_score": 10
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/wrap-ansi@9.0.x
tile.json