diff --git a/services/targo-hub/lib/skill-resolver.js b/services/targo-hub/lib/skill-resolver.js index 44a2ba9..7aaf0ad 100644 --- a/services/targo-hub/lib/skill-resolver.js +++ b/services/targo-hub/lib/skill-resolver.js @@ -46,12 +46,14 @@ function deptToSkill (txt) { const d = stripAccents(txt).toLowerCase() if (!d) return '' if (/teleph/.test(d)) return 'telephone' - if (/tele|televis/.test(d)) return 'tv' + if (/\btv\b|tele|televis/.test(d)) return 'tv' if (/fusion|episs/.test(d)) return 'épissure' if (/monteur|aerien/.test(d)) return 'monteur' if (/netadmin|net admin/.test(d)) return 'netadmin' - if (/repar|desinstall/.test(d)) return 'réparation' - if (/install|fibre/.test(d)) return 'installation' + // Diagnostic / panne / dépannage → réparation, AVANT l'installation : « voir signal fibre », « panne », « internet lent », + // « coupé », « ne fonctionne pas » = une RÉPARATION, pas une pose. (« fibre » seul = une techno, PAS une intention d'installer.) + if (/repar|desinstall|panne|signal|lent|coupe|coupure|hors.?service|ne fonctionne|fonctionne pas|marche pas|sans internet|pas d.?internet|no internet|deconnect|intermitten|verifi|diagnostic|depann|probleme|trouble|\bbris\b|defect/.test(d)) return 'réparation' + if (/install|raccord|activ|nouveau|nouvelle|mise en service|branchement/.test(d)) return 'installation' return '' }