UNPKG

@2501-ai/cli

Version:

[![npm version](https://img.shields.io/npm/v/@2501-ai/cli.svg)](https://www.npmjs.com/package/@2501-ai/cli) [![HumanEval Score](https://img.shields.io/badge/HumanEval-96.95%25-brightgreen.svg)](https://www.2501.ai/research/full-humaneval-benchmark) [![Lic

22 lines (21 loc) 761 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sanitizeWindowsOutput = sanitizeWindowsOutput; exports.isCommandNotFound = isCommandNotFound; function sanitizeWindowsOutput(output) { return output .replace(/\r\n/g, '\n') .replace(/\r/g, '\n') .replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F]/g, ''); } function isCommandNotFound(output) { const lowerOutput = output.toLowerCase(); const notFoundIndicators = [ 'not recognized as an internal or external command', 'is not recognized', 'command not found', 'was not found', 'could not find', ]; return notFoundIndicators.some((indicator) => lowerOutput.includes(indicator)); }