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

{
  "context": "This criteria evaluates how well the engineer uses the wrap-ansi package to handle whitespace-only input edge cases. The focus is on correctly utilizing wrap-ansi's trim option to achieve different behaviors when processing strings containing only whitespace characters.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses wrapAnsi function",
      "description": "Imports and calls the wrapAnsi function from the wrap-ansi package (not implementing custom wrapping logic)",
      "max_score": 20
    },
    {
      "name": "Passes trim option",
      "description": "Correctly passes the trim option from the input options object to wrapAnsi's options parameter",
      "max_score": 25
    },
    {
      "name": "Handles trim enabled",
      "description": "When trim is enabled (or default), whitespace-only strings are correctly processed to return empty strings by passing {trim: true} or using the default behavior",
      "max_score": 20
    },
    {
      "name": "Handles trim disabled",
      "description": "When trim is disabled, whitespace-only strings are preserved by passing {trim: false} to wrapAnsi",
      "max_score": 20
    },
    {
      "name": "Correct parameter order",
      "description": "Calls wrapAnsi with the correct parameter order: wrapAnsi(string, columns, options)",
      "max_score": 15
    }
  ]
}

Version

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