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

{
  "context": "This criteria evaluates how well the engineer uses wrap-ansi's trim configuration option to control whitespace handling in wrapped text. The focus is on correctly applying the trim option to achieve clean and preserve whitespace modes as specified in the problem.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses wrapAnsi function",
      "description": "Imports and uses the wrapAnsi function from the wrap-ansi package as the core wrapping mechanism",
      "max_score": 15
    },
    {
      "name": "Implements clean mode",
      "description": "Correctly implements clean mode (default behavior) by either omitting the trim option or explicitly setting trim: true in the options object passed to wrapAnsi",
      "max_score": 20
    },
    {
      "name": "Implements preserve mode",
      "description": "Correctly implements preserve mode by setting trim: false in the options object passed to wrapAnsi to preserve all whitespace",
      "max_score": 20
    },
    {
      "name": "Maps options correctly",
      "description": "Properly maps the spec's preserveWhitespace option to wrap-ansi's trim option with inverted logic (preserveWhitespace: true maps to trim: false, and preserveWhitespace: false or undefined maps to trim: true)",
      "max_score": 25
    },
    {
      "name": "Passes columns parameter",
      "description": "Correctly passes the columns parameter to wrapAnsi as the second argument to control the wrapping width",
      "max_score": 10
    },
    {
      "name": "Returns wrapped result",
      "description": "Returns the result from wrapAnsi directly or with minimal processing, allowing wrap-ansi to handle ANSI codes and whitespace according to the trim setting",
      "max_score": 10
    }
  ]
}

Version

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