faf-cli
Version: 
๐ฝ TURBO-CAT: The Rapid Catalytic Converter โข Project DNA โจ for ANY AI โข Fully Integrated with React, Next.js, Svelte, TypeScript, Vite & n8n โข FREE FOREVER โข 10,000+ developers โข Championship Edition
68 lines โข 2.19 kB
JavaScript
;
/**
 * Test Chrome Extension fuzzy detection
 */
Object.defineProperty(exports, "__esModule", { value: true });
const chrome_extension_detector_1 = require("../utils/chrome-extension-detector");
const colors_1 = require("../fix-once/colors");
console.log(colors_1.chalk.cyan('๐งช Testing Chrome Extension Fuzzy Detection'));
console.log('='.repeat(50));
const testCases = [
    // High confidence (should auto-detect)
    'chrome extension',
    'Chrome Extension for tab management',
    'browser extension',
    'chrome addon',
    // Medium confidence (needs confirmation)
    'chr ext',
    'c ext',
    'CE for managing tabs',
    'chrome-ext',
    'chr extension',
    // Typos (should auto-correct)
    'chrom extention',
    'chrome exension',
    'crome extension',
    'chrome extnsion',
    // Low confidence
    'extension',
    'popup manager',
    'browser tool',
    // Spaced patterns
    'c e x t',
    'ch ext',
    // Should NOT detect
    'react app',
    'cli tool',
    'web application'
];
console.log();
for (const testCase of testCases) {
    const result = chrome_extension_detector_1.ChromeExtensionDetector.detect(testCase);
    let icon = 'โ';
    let status = 'Not detected';
    if (result.detected) {
        icon = 'โ
';
        status = `Detected (${result.confidence})`;
    }
    else if (result.confidence === 'low') {
        icon = '๐ญ';
        status = `Maybe (${result.confidence})`;
    }
    console.log(`${icon} "${testCase}"`);
    console.log(`   โ ${status}`);
    if (result.suggestion) {
        console.log(`   โ Suggestion: ${result.suggestion}`);
    }
    if (result.needsConfirmation) {
        console.log(colors_1.chalk.yellow(`   โ Needs confirmation: "Did you mean Chrome Extension?"`));
    }
    console.log();
}
// Summary
console.log('='.repeat(50));
console.log(colors_1.chalk.green('โ
 High Confidence: Auto-accepts Chrome Extension'));
console.log(colors_1.chalk.yellow('๐ญ Medium/Low: Asks for confirmation'));
console.log(colors_1.chalk.blue('๐ง Typos: Auto-corrected'));
console.log(colors_1.chalk.red('โ Non-matches: Correctly ignored'));
//# sourceMappingURL=test-chrome-fuzzy.js.map