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-4/

{
  "context": "This criteria evaluates how well an engineer uses the wrap-ansi package to wrap text while preserving ANSI escape codes. The focus is on correctly utilizing the package's core wrapping function, understanding its ANSI preservation capabilities, and properly configuring wrapping behavior options.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses wrapAnsi function",
      "description": "Correctly imports and calls the wrapAnsi function (default export) to perform text wrapping",
      "max_score": 15
    },
    {
      "name": "Passes required parameters",
      "description": "Provides the required parameters to wrapAnsi: input string and column width (columns parameter)",
      "max_score": 10
    },
    {
      "name": "ANSI code preservation",
      "description": "Relies on wrapAnsi's built-in ANSI escape code preservation (doesn't attempt manual parsing or manipulation of escape codes)",
      "max_score": 25
    },
    {
      "name": "Hard wrapping option",
      "description": "Uses the 'hard' option in the wrapAnsi options parameter to enable hard wrapping when required (breaking long words at column boundaries)",
      "max_score": 20
    },
    {
      "name": "Handles wrapped output",
      "description": "Correctly handles the wrapped string output from wrapAnsi, which contains newline characters separating wrapped lines",
      "max_score": 15
    },
    {
      "name": "Test case coverage",
      "description": "Implements test cases that verify ANSI codes are preserved through wrapping, including colored text and multiple styles",
      "max_score": 15
    }
  ]
}

Version

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