"use strict";
/**
 * 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