Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT
79
{
"context": "Evaluates whether the solution wraps the external-editor package correctly to manage synchronous and asynchronous editing sessions with explicit cleanup. Checks proper construction with temp file options, use of run/runAsync, exit status reporting via lastExitStatus, and cleanup behavior including manual discard.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Constructor usage",
"description": "Creates a new ExternalEditor with the provided initial text and passes TempFileOptions values directly into the constructor rather than reimplementing temp file handling.",
"max_score": 15
},
{
"name": "Sync launch",
"description": "Uses editor.run() for synchronous sessions to obtain the edited text, then triggers editor.cleanup() after reading the file so the temp file is always removed.",
"max_score": 20
},
{
"name": "Async launch",
"description": "Uses editor.runAsync(callback) for asynchronous sessions with an error-first callback, relaying any error immediately and invoking editor.cleanup() after the callback completes.",
"max_score": 20
},
{
"name": "Exit status",
"description": "Reads editor.lastExitStatus (or last_exit_status) after run/runAsync and returns it as the session exitStatus instead of defaulting to zero or ignoring it.",
"max_score": 15
},
{
"name": "Manual discard",
"description": "Implements the discard operation by calling editor.cleanup() even if no run was performed and surfaces RemoveFileError (or the underlying error) when cleanup fails.",
"max_score": 15
},
{
"name": "Option passthrough",
"description": "Forwards prefix, postfix, template, dir, and mode options unchanged to ExternalEditor so both run() and runAsync() sessions honor the caller's temp file preferences.",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-external-editordocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10